projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7763118
)
log: Remove undefined behaviour
author
Luca Barbato
<lu_zero@gentoo.org>
Thu, 3 Apr 2014 13:51:47 +0000
(13:51 +0000)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Thu, 3 Apr 2014 16:43:24 +0000
(18:43 +0200)
libavutil/log.c
patch
|
blob
|
history
diff --git
a/libavutil/log.c
b/libavutil/log.c
index
c447b5a
..
6522ef3
100644
(file)
--- 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);
}