summaryrefslogtreecommitdiff
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-03 22:42:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-03 22:44:04 +0200
commit49e040e8680365c17f9cfbf94f3a3238afbe718b (patch)
treea95449f5f6cf2d78bc097dda1f9ee071029a02d8 /libavutil/log.c
parent1f8a6bef78284849372d0128ab3ea87f825142db (diff)
avutil/log: fix negative log levels
These where broken by 7763118cae4eb468b032dbd29af15a011c2c233b Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/log.c')
-rw-r--r--libavutil/log.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 843d2e91eb..d40be2bc55 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;