summaryrefslogtreecommitdiff
path: root/libavfilter/buffersink.c
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2020-09-08 19:55:41 +0200
committerNicolas George <george@nsup.org>2020-09-09 16:39:55 +0200
commitb0203fa72bfa5f98b20b7b57d7f6a6b574ad3f92 (patch)
treeab15e05c4529201a01ad4fc63a1134e01279747c /libavfilter/buffersink.c
parent16c916e4c90cc6fa6b53563c7d4db701d8001feb (diff)
downloadffmpeg-b0203fa72bfa5f98b20b7b57d7f6a6b574ad3f92.tar.gz
lavfi/buffersink: cast to uint64_t before shifting.
Fix CID 1466666.
Diffstat (limited to 'libavfilter/buffersink.c')
-rw-r--r--libavfilter/buffersink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 9338969bf1..58848941d4 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -72,10 +72,10 @@ static void cleanup_redundant_layouts(AVFilterContext *ctx)
for (i = 0; i < nb_counts; i++)
if (buf->channel_counts[i] < 64)
- counts |= 1 << buf->channel_counts[i];
+ counts |= (uint64_t)1 << buf->channel_counts[i];
for (i = lc = 0; i < nb_layouts; i++) {
n = av_get_channel_layout_nb_channels(buf->channel_layouts[i]);
- if (n < 64 && (counts & (1 << n)))
+ if (n < 64 && (counts & ((uint64_t)1 << n)))
av_log(ctx, AV_LOG_WARNING,
"Removing channel layout 0x%"PRIx64", redundant with %d channels\n",
buf->channel_layouts[i], n);