Commit 39bb26f9 authored by Nicolas George's avatar Nicolas George

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 c25d1ba5.
parent 5cd57e87
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment