File: 0006-opus_header-fix-channel-mapping-family-1-parsing.patch

package info (click to toggle)
vlc 3.0.21-10
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 212,728 kB
  • sloc: ansic: 441,379; cpp: 110,628; objc: 36,394; sh: 6,947; makefile: 6,592; javascript: 4,902; xml: 1,611; asm: 1,355; yacc: 640; python: 555; lex: 88; perl: 77; sed: 16
file content (24 lines) | stat: -rw-r--r-- 810 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Tristan Matthews <tmatth@videolan.org>
Date: Wed, 1 Feb 2023 23:39:36 -0500
Subject: opus_header: fix channel mapping family 1 parsing

Fixes #27808

(cherry picked from commit 79fa6af0a98921f9d34933761f4fe20ef6c35309)
---
 modules/codec/opus_header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/opus_header.c b/modules/codec/opus_header.c
index 4069a5c..b134b20 100644
--- a/modules/codec/opus_header.c
+++ b/modules/codec/opus_header.c
@@ -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;