aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2013-08-07 15:50:27 +0200
committerNicolas George <nicolas.george@normalesup.org>2013-08-07 16:01:45 +0200
commit39bb26f91b18a6fb6d2ccfb6464b8a87787587fe (patch)
treea5a8f578814d0c83c3f32016a532a6fcbe8a3258
parent5cd57e8758e336e86698d4994ee088077869e42d (diff)
downloadffmpeg-39bb26f91b18a6fb6d2ccfb6464b8a87787587fe.tar.gz
lavu/log: do not skip overwritten lines.
If the line ends with \r, it will not flood the tty, and the "Last message repeated" line would overwrite it. Fix bug introduced by c25d1ba.
-rw-r--r--libavutil/log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 29ad2d0c28..cde7c12e4d 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -224,7 +224,8 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
is_atty = isatty(2) ? 1 : -1;
#endif
- if (print_prefix && (flags & AV_LOG_SKIP_REPEATED) && !strcmp(line, prev) && *line){
+ if (print_prefix && (flags & AV_LOG_SKIP_REPEATED) && !strcmp(line, prev) &&
+ *line && line[strlen(line) - 1] != '\r'){
count++;
if (is_atty == 1)
fprintf(stderr, " Last message repeated %d times\r", count);