[FFmpeg-cvslog] avutil/log: leave prefix printing state on empty input.
Michael Niedermayer
git at videolan.org
Fri Apr 26 20:48:20 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 26 20:31:25 2013 +0200| [74b1c32a8027c2d3eb6d4fdf6d6857f7587a069b] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=74b1c32a8027c2d3eb6d4fdf6d6857f7587a069b
---
libavutil/log.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavutil/log.c b/libavutil/log.c
index 6051418..f4d0b88 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,
More information about the ffmpeg-cvslog
mailing list