Commit 019dd236 authored by Mans Rullgard's avatar Mans Rullgard

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: 's avatarMans Rullgard <mans@mansr.com>
parent be1e8725
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment