diff mbox series

[FFmpeg-devel,02/20] fftools/ffmpeg_opt: drop HAS_ARG from auto{scale, rotate}

Message ID 20231218095722.25879-2-anton@khirnov.net
State Accepted
Commit 25c98566e8a45b50415c80ca6450282f2ec0657a
Headers show
Series [FFmpeg-devel,01/20] fftools/ffmpeg_filter: only set framerate for video | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Dec. 18, 2023, 9:57 a.m. UTC
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 mbox series

Patch

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) },