diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-26 20:31:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-26 20:31:25 +0200 |
commit | 74b1c32a8027c2d3eb6d4fdf6d6857f7587a069b (patch) | |
tree | 8a752671d601d3540655c2bc8b59ab0b0c937600 /libavutil/log.c | |
parent | d78329700df228e1e951400a98417be18bad25b0 (diff) | |
download | ffmpeg-74b1c32a8027c2d3eb6d4fdf6d6857f7587a069b.tar.gz |
avutil/log: leave prefix printing state on empty input.
Fixes printing the prefix after an empty string was printed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/log.c')
-rw-r--r-- | libavutil/log.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/log.c b/libavutil/log.c index 6051418535..f4d0b88d5e 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -190,7 +190,8 @@ static void format_line(void *ptr, int level, const char *fmt, va_list vl, vsnprintf(part[2], part_size, fmt, vl); - *print_prefix = strlen(part[2]) && part[2][strlen(part[2]) - 1] == '\n'; + if(*part[0] || *part[1] || *part[2]) + *print_prefix = strlen(part[2]) && part[2][strlen(part[2]) - 1] == '\n'; } void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl, |