]> git.sesse.net Git - ffmpeg/commitdiff
lavfi/buffersink: cast to uint64_t before shifting.
authorNicolas George <george@nsup.org>
Tue, 8 Sep 2020 17:55:41 +0000 (19:55 +0200)
committerNicolas George <george@nsup.org>
Wed, 9 Sep 2020 14:39:55 +0000 (16:39 +0200)
Fix CID 1466666.

libavfilter/buffersink.c

index 9338969bf16df8009a17f4d039db79d6b38e7e8a..58848941d4819145121ed6fff5111a345d34538d 100644 (file)
@@ -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);