[FFmpeg-devel] [PATCH v4 2/6] fftools/cmdutils: Print arguments of options

Thilo Borgmann thilo.borgmann at mail.de
Mon Sep 19 12:46:00 EEST 2022


---
 fftools/cmdutils.c | 5 +++++
 fftools/cmdutils.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index f911c52be2..b6dd73902b 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -162,6 +162,11 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags,
             av_strlcat(buf, po->argname, sizeof(buf));
         }
         printf("-%-17s  %s\n", buf, po->help);
+
+        if (po->args) {
+            const AVClass *p = po->args;
+            av_arg_show(&p, NULL);
+        }
     }
     printf("\n");
 }
diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
index 4496221983..2f469f8c25 100644
--- a/fftools/cmdutils.h
+++ b/fftools/cmdutils.h
@@ -175,6 +175,7 @@ typedef struct OptionDef {
     } u;
     const char *help;
     const char *argname;
+    const AVClass *args;
 } OptionDef;
 
 /**
-- 
2.20.1 (Apple Git-117)



More information about the ffmpeg-devel mailing list