diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-08-09 14:44:18 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-08-10 23:14:44 +0200 |
commit | ad5043e285865cb9297e32ce25da93841cf76d3f (patch) | |
tree | e719ce6fe1a72092fb62d36d34240f89ae43b479 /cmdutils.c | |
parent | a6d6b8a20072a5919d38258dd48cc612e2372f81 (diff) | |
download | ffmpeg-ad5043e285865cb9297e32ce25da93841cf76d3f.tar.gz |
cmdutils: show options in show_help_children only if the context has options
Avoid to print a pointless name of the context followed by an empty list.
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c index 7d71d6569c..6859692e8b 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -168,8 +168,10 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, void show_help_children(const AVClass *class, int flags) { const AVClass *child = NULL; - av_opt_show2(&class, NULL, flags, 0); - printf("\n"); + if (class->option) { + av_opt_show2(&class, NULL, flags, 0); + printf("\n"); + } while (child = av_opt_child_class_next(class, child)) show_help_children(child, flags); |