[FFmpeg-cvslog] cmdutils: allow forcing log line repeation

Michael Niedermayer git at videolan.org
Sun Mar 31 18:07:26 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Mar 31 14:08:03 2013 +0200| [5c13ae280fd5e7066347c2eb006be087a001924d] | committer: Michael Niedermayer

cmdutils: allow forcing log line repeation

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 cmdutils.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/cmdutils.c b/cmdutils.c
index ca1c965..a280ff3 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -795,6 +795,13 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
     int level;
     int i;
 
+    tail = strstr(arg, "repeat");
+    av_log_set_flags(tail ? 0 : AV_LOG_SKIP_REPEATED);
+    if (tail == arg)
+        arg += 6 + (arg[6]=='+');
+    if(tail && !*arg)
+        return 0;
+
     for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) {
         if (!strcmp(log_levels[i].name, arg)) {
             av_log_set_level(log_levels[i].level);



More information about the ffmpeg-cvslog mailing list