diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-03 20:53:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-03 20:53:30 +0200 |
commit | 002feaf6e22c80f542d3155cf5af67ee5e945cc8 (patch) | |
tree | 1c9ec157842b1d4e6e75739fec62a80e1e433d24 /libavutil | |
parent | c16e00618122a7f1217f5174a6c4013eb57421b0 (diff) | |
parent | 28b9ac4e48f3405a82e8e87ead336188215cf1e6 (diff) | |
download | ffmpeg-002feaf6e22c80f542d3155cf5af67ee5e945cc8.tar.gz |
Merge commit '28b9ac4e48f3405a82e8e87ead336188215cf1e6'
* commit '28b9ac4e48f3405a82e8e87ead336188215cf1e6':
log: Remove undefined behaviour
Conflicts:
libavutil/log.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/log.c b/libavutil/log.c index b39196d5ff..0f09a10ada 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -258,7 +258,7 @@ 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]; - int tint = av_clip(level >> 8, 0, 256); + unsigned tint = level & 0xff00; level &= 0xff; @@ -294,7 +294,7 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl) sanitize(part[1].str); colored_fputs(type[1], 0, part[1].str); sanitize(part[2].str); - colored_fputs(av_clip(level >> 3, 0, 6), tint, part[2].str); + colored_fputs(av_clip(level >> 3, 0, 6), tint >> 8, part[2].str); end: av_bprint_finalize(part+2, NULL); #if HAVE_PTHREADS |