[FFmpeg-cvslog] opt: attempt to improve options dump output.

Clément Bœsch git at videolan.org
Sun Mar 31 20:29:24 CEST 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Sun Mar 31 15:14:08 2013 +0200| [d00dcb8c9f5f09094c262adea553509939c4f8ff] | committer: Clément Bœsch

opt: attempt to improve options dump output.

Add some indent and remove the '-' prefix for filters.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d00dcb8c9f5f09094c262adea553509939c4f8ff
---

 libavutil/opt.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 97fc6fd..fb3b724 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -839,9 +839,11 @@ static void opt_list(void *obj, void *av_log_obj, const char *unit,
         else if (unit && opt->type==AV_OPT_TYPE_CONST && strcmp(unit, opt->unit))
             continue;
         else if (unit && opt->type == AV_OPT_TYPE_CONST)
-            av_log(av_log_obj, AV_LOG_INFO, "   %-15s ", opt->name);
+            av_log(av_log_obj, AV_LOG_INFO, "     %-15s ", opt->name);
         else
-            av_log(av_log_obj, AV_LOG_INFO, "-%-17s ", opt->name);
+            av_log(av_log_obj, AV_LOG_INFO, "  %s%-17s ",
+                   (opt->flags & AV_OPT_FLAG_FILTERING_PARAM) ? "" : "-",
+                   opt->name);
 
         switch (opt->type) {
             case AV_OPT_TYPE_FLAGS:



More information about the ffmpeg-cvslog mailing list