cmdutils: allow forcing log line repeation
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 31 Mar 2013 12:08:03 +0000 (14:08 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 31 Mar 2013 16:06:18 +0000 (18:06 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
cmdutils.c

index ca1c965..a280ff3 100644 (file)
@@ -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);