mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
lavu/log: print prefix after \r.
Should fix trac ticket #2797 because of the progress line.
This commit is contained in:
parent
b67401797e
commit
c25d1ba556
@ -190,8 +190,10 @@ static void format_line(void *ptr, int level, const char *fmt, va_list vl,
|
|||||||
|
|
||||||
vsnprintf(part[2], part_size, fmt, vl);
|
vsnprintf(part[2], part_size, fmt, vl);
|
||||||
|
|
||||||
if(*part[0] || *part[1] || *part[2])
|
if(*part[0] || *part[1] || *part[2]) {
|
||||||
*print_prefix = strlen(part[2]) && part[2][strlen(part[2]) - 1] == '\n';
|
char lastc = strlen(part[2]) ? part[2][strlen(part[2]) - 1] : 0;
|
||||||
|
*print_prefix = lastc == '\n' || lastc == '\r';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
|
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
|
||||||
|
Loading…
Reference in New Issue
Block a user