[FFmpeg-cvslog] avutil/log: fix negative log levels
Michael Niedermayer
git at videolan.org
Thu Apr 3 22:54:15 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Apr 3 22:42:24 2014 +0200| [49e040e8680365c17f9cfbf94f3a3238afbe718b] | committer: Michael Niedermayer
avutil/log: fix negative log levels
These where broken by 7763118cae4eb468b032dbd29af15a011c2c233b
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49e040e8680365c17f9cfbf94f3a3238afbe718b
---
libavutil/log.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/libavutil/log.c b/libavutil/log.c
index 843d2e9..d40be2b 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -258,10 +258,12 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
char line[LINE_SZ];
static int is_atty;
int type[2];
- unsigned tint = level & 0xff00;
-
- level &= 0xff;
+ unsigned tint = 0;
+ if (level >= 0) {
+ tint = level & 0xff00;
+ level &= 0xff;
+ }
if (level > av_log_level)
return;
More information about the ffmpeg-cvslog
mailing list