avcodec: avoid signedness mismatch warning
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 5 May 2018 12:28:15 +0000 (15:28 +0300)
committerSebastian Ramacher <sramacher@debian.org>
Thu, 15 Aug 2024 10:11:01 +0000 (12:11 +0200)
Bitmask should be unsigned, but ffmpeg seems confused with itself.

(cherry picked from commit 8544233e7fde2965435e32a445494898440ecc30)

Gbp-Pq: Name 0004-avcodec-avoid-signedness-mismatch-warning.patch

modules/codec/avcodec/audio.c

index 50a76c7a18e1b0d57c87153e5ea85fca7a7c8047..e5af0ca5f2f89e7ec557fd47c1fb6beba91a3a31 100644 (file)
@@ -593,9 +593,9 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
     uint32_t pi_order_src[i_order_max];
 
     int i_channels_src = 0;
-    int64_t channel_layout =
+    uint64_t channel_layout =
         p_sys->p_context->channel_layout ? p_sys->p_context->channel_layout :
-        av_get_default_channel_layout( p_sys->p_context->channels );
+        (uint64_t)av_get_default_channel_layout( p_sys->p_context->channels );
 
     if( channel_layout )
     {