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.
This commit is contained in:
parent
a6d6b8a200
commit
ad5043e285
@ -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)
|
void show_help_children(const AVClass *class, int flags)
|
||||||
{
|
{
|
||||||
const AVClass *child = NULL;
|
const AVClass *child = NULL;
|
||||||
av_opt_show2(&class, NULL, flags, 0);
|
if (class->option) {
|
||||||
printf("\n");
|
av_opt_show2(&class, NULL, flags, 0);
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
while (child = av_opt_child_class_next(class, child))
|
while (child = av_opt_child_class_next(class, child))
|
||||||
show_help_children(child, flags);
|
show_help_children(child, flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user