From 7a6cd9957de27cbc8a69510f3d11dffea31f7ad8 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 4 Oct 2011 14:50:00 +0200 Subject: cmdutils/avtools: simplify show_help() by using av_opt_child_class_next() --- cmdutils.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmdutils.c') diff --git a/cmdutils.c b/cmdutils.c index afe47cb864..ade3f10ce2 100644 --- a/cmdutils.c +++ b/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); -- cgit v1.2.3