summaryrefslogtreecommitdiff
path: root/avconv_opt.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-08-11 19:45:30 +0200
committerAnton Khirnov <anton@khirnov.net>2012-08-19 19:21:35 +0200
commit7c5012127fb7e18f0616011257bb4248f6a8b608 (patch)
treeb15931979cb46f5fc5f5d5b79680de8664f9a7d5 /avconv_opt.c
parentdc4c24a3d35603957aecf2b075ac25902d18a190 (diff)
cmdutils: change semantics of show_help_options() and document it.
Currently it takes a mask and value, such that options for which (flags & mask) == value. Change it to take required flags and forbidden flags instead. This is shorter and simpler to understand.
Diffstat (limited to 'avconv_opt.c')
-rw-r--r--avconv_opt.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/avconv_opt.c b/avconv_opt.c
index 8915a865c9..ac1a65ecfb 100644
--- a/avconv_opt.c
+++ b/avconv_opt.c
@@ -1795,24 +1795,19 @@ static int show_help(const char *opt, const char *arg)
av_log_set_callback(log_callback_help);
show_usage();
show_help_options(options, "Main options:",
- OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE, 0);
+ 0, OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE);
show_help_options(options, "Advanced options:",
- OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE,
- OPT_EXPERT);
+ OPT_EXPERT, OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE);
show_help_options(options, "Video options:",
- OPT_EXPERT | OPT_AUDIO | OPT_VIDEO,
- OPT_VIDEO);
+ OPT_VIDEO, OPT_EXPERT | OPT_AUDIO);
show_help_options(options, "Advanced Video options:",
- OPT_EXPERT | OPT_AUDIO | OPT_VIDEO,
- OPT_VIDEO | OPT_EXPERT);
+ OPT_EXPERT | OPT_VIDEO, OPT_AUDIO);
show_help_options(options, "Audio options:",
- OPT_EXPERT | OPT_AUDIO | OPT_VIDEO,
- OPT_AUDIO);
+ OPT_AUDIO, OPT_EXPERT | OPT_VIDEO);
show_help_options(options, "Advanced Audio options:",
- OPT_EXPERT | OPT_AUDIO | OPT_VIDEO,
- OPT_AUDIO | OPT_EXPERT);
+ OPT_EXPERT | OPT_AUDIO, OPT_VIDEO);
show_help_options(options, "Subtitle options:",
- OPT_SUBTITLE, OPT_SUBTITLE);
+ OPT_SUBTITLE, 0);
printf("\n");
show_help_children(avcodec_get_class(), flags);
show_help_children(avformat_get_class(), flags);