From 7c5012127fb7e18f0616011257bb4248f6a8b608 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 11 Aug 2012 19:45:30 +0200 Subject: 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. --- avconv_opt.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'avconv_opt.c') 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); -- cgit v1.2.3