diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-04-03 13:51:47 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-04-03 18:43:24 +0200 |
commit | 28b9ac4e48f3405a82e8e87ead336188215cf1e6 (patch) | |
tree | 51c0436e35fd646908ee3ca6433411ed8547c62d | |
parent | 7763118cae4eb468b032dbd29af15a011c2c233b (diff) | |
download | ffmpeg-28b9ac4e48f3405a82e8e87ead336188215cf1e6.tar.gz |
log: Remove undefined behaviour
-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 c447b5a10f..6522ef3607 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -117,7 +117,7 @@ void av_log_default_callback(void *avcl, int level, const char *fmt, va_list vl) char line[1024]; static int is_atty; AVClass* avc = avcl ? *(AVClass **) avcl : NULL; - int tint = av_clip(level >> 8, 0, 256); + unsigned tint = level & 0xff00; level &= 0xff; @@ -157,7 +157,7 @@ void av_log_default_callback(void *avcl, int level, const char *fmt, va_list vl) fprintf(stderr, " Last message repeated %d times\n", count); count = 0; } - colored_fputs(av_clip(level >> 3, 0, 6), tint, line); + colored_fputs(av_clip(level >> 3, 0, 6), tint >> 8, line); av_strlcpy(prev, line, sizeof line); } |