From patchwork Mon Dec 18 09:57:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 45216 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1225:b0:181:818d:5e7f with SMTP id v37csp7222238pzf; Mon, 18 Dec 2023 01:59:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjfMcKXvz6Kwu6CAJ6xgRn00ntz1LiaeY0HbeSlHzeFve9ibezfFsULuY+KaxECM3nSVsB X-Received: by 2002:a50:cd84:0:b0:553:5b2e:a570 with SMTP id p4-20020a50cd84000000b005535b2ea570mr1016955edi.0.1702893579426; Mon, 18 Dec 2023 01:59:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702893579; cv=none; d=google.com; s=arc-20160816; b=i7md0W1pRhUD0qXD6grC8SixYl16sCac0u2AOTCthMwaYtGReJ6b/gjy/AdhBB1IGK K9sE1Q3FSgzxysuCDXc3Y9lwLhANfv6vnpoE5ofj5pGz4OsyVlPv+ymQU2i3eqWyJV2a lIU4R9YTgk4ecTl0U/e1HVaICpbcRCSBZ54RTdrlRIKXqsbVldmzPQd5wMW1baZ0Uh9k fe233vjz2Rh38t7bjeDoAamMzhnFBx4LoKvOrTWvjyorgg53K2h57r3IJXJt3V+t/zBY aBOWveeyBqRwNwvgJClL1UB5NqeykQXpGySwKlWbMS28ZvczvdV+EhoDltxdnMO6JrnJ ut/w== 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:delivered-to; bh=AW2lfvhScSZTcgj5N1VVzX4yguSHdsR+pkoxD1LGJVM=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=kkHFPpy8k97an+t+CMlVKDev8FCxnW9/u99C+9szS4KZ6I7EfH6GaBhKhRn43ucPHy Oog3FAXM/WzBYnSpybp1VwExLny65ikvIeSagIxs8OBuIyiC5TOJ/HtPC+UhANztj8ex ZWdR+JHy9CpK0Iz70g258Y8OCo2Vh5GsBjJqo+iDlucUEhiaa2Ju76qe9fzY+0V0oicV vSt7Je8Ojg15363UQ98xhzppAW4acnJdNFs0GVEHqId0tA6ydkrTO7C3tRFgiTUG40QM 8rMKgBuf2FQkRnbOAeUsDDb4q3X3l5sds89oVwH2dV9Mkfc7QKEhjyLQY6pypa5Bze1g k0Kg== ARC-Authentication-Results: i=1; mx.google.com; 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: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j19-20020a05640211d300b00553752b459csi104959edw.162.2023.12.18.01.59.39; Mon, 18 Dec 2023 01:59:39 -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; 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 1E65768D2A9; Mon, 18 Dec 2023 11:58:12 +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 CD31A68D1E5 for ; Mon, 18 Dec 2023 11:58:00 +0200 (EET) Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id BB5D53E17 for ; Mon, 18 Dec 2023 10:57:57 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 8LYs1MBzm1Lh for ; Mon, 18 Dec 2023 10:57:57 +0100 (CET) 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 68535467A for ; Mon, 18 Dec 2023 10:57:53 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id EFB0B3A0585 for ; Mon, 18 Dec 2023 10:57:43 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 18 Dec 2023 10:57:04 +0100 Message-ID: <20231218095722.25879-2-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231218095722.25879-1-anton@khirnov.net> References: <20231218095722.25879-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 02/20] fftools/ffmpeg_opt: drop HAS_ARG from auto{scale, rotate} X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: SbZ+IQIWotpZ It causes those options to be parsed as either * -autofoo 0/1 (with an argument) * -noautofoo (without an argument) This is unnecessary, confusing, and against the documentation; these are also the only two bool options that take an argument. This should not affect the users, as these options are on by default, and are supposed to be used as -nofoo per the documentation. --- fftools/ffmpeg_opt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 96d3c56fd7..295a393eba 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1741,11 +1741,9 @@ const OptionDef options[] = { "select output format used with HW accelerated decoding", "format" }, { "hwaccels", OPT_EXIT, { .func_arg = show_hwaccels }, "show available HW acceleration methods" }, - { "autorotate", HAS_ARG | OPT_BOOL | OPT_SPEC | - OPT_EXPERT | OPT_INPUT, { .off = OFFSET(autorotate) }, + { "autorotate", OPT_BOOL | OPT_SPEC | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(autorotate) }, "automatically insert correct rotate filters" }, - { "autoscale", HAS_ARG | OPT_BOOL | OPT_SPEC | - OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(autoscale) }, + { "autoscale", OPT_BOOL | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(autoscale) }, "automatically insert a scale filter at the end of the filter graph" }, { "fix_sub_duration_heartbeat", OPT_VIDEO | OPT_BOOL | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(fix_sub_duration_heartbeat) },