Message ID | 20240223143115.16521-10-anton@khirnov.net |
---|---|
State | Accepted |
Commit | 9fabdd64b2cd9b75337afe4f1f2268935a25d063 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:26a3:b0:19e:cdac:8cce with SMTP id h35csp992770pze; Fri, 23 Feb 2024 06:32:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWJIPgw37K6VHP1Vsr4bW1gYT1GKO07PZZ/nvS0O3sDNQCp1agH5tsyeK0LA8F9FBeNhwfYgF+yKEooUWRwC4jQs2d9Zuwh4tCcyQ== X-Google-Smtp-Source: AGHT+IGlqCvSevNf8oMX1MSfEaX7jpj+96VPKbJLPD6PgiR0pIuPpm4FQg4nBYtymr0lu0qmZ/Nq X-Received: by 2002:a17:906:f150:b0:a3e:b263:d769 with SMTP id gw16-20020a170906f15000b00a3eb263d769mr1372194ejb.4.1708698769625; Fri, 23 Feb 2024 06:32:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708698769; cv=none; d=google.com; s=arc-20160816; b=i+M5sHCnBLZeAZSghxYHD4b1RwAAEI14t1pYZtaVYJiDYFMDvG5O33xbNens0zfgkZ FQ0qWG9G6PPqDgfR2fwevNh0lQ23FkGNZiim7WnHz0iy7OJ/ts4JCBlK0w13Iihmq6W0 I6EkGmzSvU2+jWbxIqQYo1m1C8NoawdFk1L0ag6HW768rvipdxGLqoNb8tqjQLRgE6lW w8pOuppK3fqk60u7kRwFtnB216vhJQJ8e17fH/ppH/Es8HFq7a9x2DPovWO7sEssF6YU XsGazpvAjPN9+xWI8kSRf3yr51W3vyxW8ioF9kj6C8oTBJUwXENBDvHzti/tUiQLlpVm 4X2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=sc5Zdt6DB490fpQy5lBWrTQjTflPggsLokKFM8ybkO8=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=LnZh7XyPRDSBs3F/eOccGhD7KNKLwISspo7jrrfOvKLp9/mJbR4US6NABNIhJB1Yzi PR6lzb8EMNGbWXK0I3jfSgGGievgO5GWzUr8hpRD0sXikopgrk+ydGM7mRJwBH7M5sBt dV0ldwVUB+hMYipTpZh7Ow+yZSqtZWg03+ufPc7kPtvj1VrP965JyVFRdJqiP0SBH9vd dKUlKUC3R0tdiaQuOuREeER6r5MaJyfznVeBjPIXomATF3OKMWu2n7Amyd9sVpZ2LP7Y LoXkX0AvNgSo1TphMq0zEHFz1UG4xlunvsKFNuHIl+DDIayF6nDeTCfrdrHh9Ae8X/1C 3K3Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=XV9eevBq; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q26-20020a50aa9a000000b005643c129c0asi5337831edc.416.2024.02.23.06.32.49; Fri, 23 Feb 2024 06:32:49 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=XV9eevBq; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BDBAE68C7A2; Fri, 23 Feb 2024 16:31:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4FDAF68C5EE for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 16:31:30 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=XV9eevBq; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id EAE1E448A for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:31:29 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 6TCm5iyL_Htv for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:31:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1708698687; bh=7I/48SG3QLh9XFIFUPZcp02lpxBAML9ic2aa5eC1BfU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XV9eevBqD8zo+y0U1rHh8vUdbMw4ssHGk6Gby/pYeriHhBryqKs3wtsuECfdzStYI 6NjArW67f5Q8YzO+d/0XnSnKrUUdkk+10PNdAdZFuwwnNuxv6bbzlRFtKTZxsY1e4E 0H9+MKZPnGc877gKr3r2sWwFp+wnYePjlFwEk1CmEqduPk0/5W1Yg1SFXk9hhSLXkb 0L/cJGgeQTQJmTxRh3ytX2FGVZHe3otQsPgFOlvf6TzV+XjZX6zqyj8SWu99/uBJJ4 Ak0V/VSlXCmQVHWhZDqyfsYhEjg/1XS0ehKNNqIXC4BoFXoY4Ny+JkpCnPndy3LVoo d/IAEDJK0bHFg== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 655254D38 for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:31:27 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 3B6F83A1931 for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:31:22 +0100 (CET) From: Anton Khirnov <anton@khirnov.net> To: ffmpeg-devel@ffmpeg.org Date: Fri, 23 Feb 2024 14:58:31 +0100 Message-ID: <20240223143115.16521-10-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240223143115.16521-1-anton@khirnov.net> References: <20240223143115.16521-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/38] lavu/opt: drop useless handling of NULL return from get_bool_name() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: PknSBhLWY6Vs |
Series |
[FFmpeg-devel,01/38] lavu/opt: cosmetics, change option flags to (1 << N) style
|
expand
|
diff --git a/libavutil/opt.c b/libavutil/opt.c index 49b7da7742..0ffdfc9a1e 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -853,7 +853,7 @@ int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val) buf[0] = 0; switch (o->type) { case AV_OPT_TYPE_BOOL: - ret = snprintf(buf, sizeof(buf), "%s", (char *)av_x_if_null(get_bool_name(*(int *)dst), "invalid")); + ret = snprintf(buf, sizeof(buf), "%s", get_bool_name(*(int *)dst)); break; case AV_OPT_TYPE_FLAGS: ret = snprintf(buf, sizeof(buf), "0x%08X", *(int *)dst); @@ -1282,7 +1282,7 @@ static void log_default(void *obj, void *av_log_obj, const AVOption *opt) av_log(av_log_obj, AV_LOG_INFO, " (default "); switch (opt->type) { case AV_OPT_TYPE_BOOL: - av_log(av_log_obj, AV_LOG_INFO, "%s", (char *)av_x_if_null(get_bool_name(opt->default_val.i64), "invalid")); + av_log(av_log_obj, AV_LOG_INFO, "%s", get_bool_name(opt->default_val.i64)); break; case AV_OPT_TYPE_FLAGS: { char *def_flags = get_opt_flags_string(obj, opt->unit, opt->default_val.i64);