mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-25 14:09:14 +00:00
cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()
This commit is contained in:
parent
145f741e11
commit
7a6cd9957d
5 changed files with 24 additions and 55 deletions
10
cmdutils.c
10
cmdutils.c
|
@ -130,6 +130,16 @@ void show_help_options(const OptionDef *options, const char *msg, int mask, int
|
|||
}
|
||||
}
|
||||
|
||||
void show_help_children(const AVClass *class, int flags)
|
||||
{
|
||||
const AVClass *child = NULL;
|
||||
av_opt_show2(&class, NULL, flags, 0);
|
||||
printf("\n");
|
||||
|
||||
while (child = av_opt_child_class_next(class, child))
|
||||
show_help_children(child, flags);
|
||||
}
|
||||
|
||||
static const OptionDef* find_option(const OptionDef *po, const char *name){
|
||||
const char *p = strchr(name, ':');
|
||||
int len = p ? p - name : strlen(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue