summaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-11-25 14:58:50 +0000
committerMans Rullgard <mans@mansr.com>2011-11-25 15:19:55 +0000
commit019dd2365729d44d66a5b629102e1ecb919f4f67 (patch)
treeb8ad7c00a2b1eadc28c8975afb2a743184526bcf /libavutil
parentbe1e872582c861873bd9ca8c1098da55f41bced4 (diff)
downloadffmpeg-streaming-019dd2365729d44d66a5b629102e1ecb919f4f67.zip
ffmpeg-streaming-019dd2365729d44d66a5b629102e1ecb919f4f67.tar.gz
Fix av_get_channel_layout_string() for positions >31
A value shifted left by >31 needs to have a 64-bit type. As there are no defined channels in this range, the fix is purely theoretical at this point, although it does avoid some invalid shifts triggering the overflow checker. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/audioconvert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c
index 52656c7..e9f9e41 100644
--- a/libavutil/audioconvert.c
+++ b/libavutil/audioconvert.c
@@ -109,7 +109,7 @@ void av_get_channel_layout_string(char *buf, int buf_size,
int i, ch;
av_strlcat(buf, " (", buf_size);
for (i = 0, ch = 0; i < 64; i++) {
- if ((channel_layout & (1L << i))) {
+ if ((channel_layout & (UINT64_C(1) << i))) {
const char *name = get_channel_name(i);
if (name) {
if (ch > 0)
OpenPOWER on IntegriCloud