opus_header: fix channel mapping family 1 parsing
authorTristan Matthews <tmatth@videolan.org>
Thu, 2 Feb 2023 04:39:36 +0000 (23:39 -0500)
committerSebastian Ramacher <sramacher@debian.org>
Fri, 7 Mar 2025 06:31:22 +0000 (07:31 +0100)
Fixes #27808

(cherry picked from commit 79fa6af0a98921f9d34933761f4fe20ef6c35309)

Gbp-Pq: Name 0006-opus_header-fix-channel-mapping-family-1-parsing.patch

modules/codec/opus_header.c

index 4069a5cf46139173c4512da442c9604097817cc8..b134b20b625b5a5c90de614a02b67132f65f455f 100644 (file)
@@ -205,7 +205,7 @@ int opus_header_parse(const unsigned char *packet, int len, OpusHeader *h)
         h->nb_coupled = ch;
 
         /* Multi-stream support */
-        if(h->channel_mapping == 2)
+        if(h->channel_mapping <= 2)
         {
             if (h->nb_coupled + h->nb_streams > 255)
                 return 0;