Browse code

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.

Stefano Sabatini authored on 2012/08/09 21:44:18
Showing 1 changed files
... ...
@@ -168,8 +168,10 @@ void show_help_options(const OptionDef *options, const char *msg, int mask,
168 168
 void show_help_children(const AVClass *class, int flags)
169 169
 {
170 170
     const AVClass *child = NULL;
171
-    av_opt_show2(&class, NULL, flags, 0);
172
-    printf("\n");
171
+    if (class->option) {
172
+        av_opt_show2(&class, NULL, flags, 0);
173
+        printf("\n");
174
+    }
173 175
 
174 176
     while (child = av_opt_child_class_next(class, child))
175 177
         show_help_children(child, flags);