File: 0030-packetizer-dts-check-for-frame_size-for-the-first-sy.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 (26 lines) | stat: -rw-r--r-- 1,109 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Thomas Guillem <thomas@gllm.fr>
Date: Wed, 11 Sep 2024 08:16:36 +0200
Subject: packetizer: dts: check for frame_size for the first sync

Only substreams are allowed to have a frame_size of 0.

(cherry picked from commit 16b31aa57e3919dbe661c213868dee4b8bc1e3bd)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
---
 modules/packetizer/dts.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/packetizer/dts.c b/modules/packetizer/dts.c
index a57c698..5d0deb4 100644
--- a/modules/packetizer/dts.c
+++ b/modules/packetizer/dts.c
@@ -205,7 +205,8 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t **pp_block )
 
             /* Check if frame is valid and get frame info */
             if( vlc_dts_header_Parse( &p_sys->first, p_header,
-                                      VLC_DTS_HEADER_SIZE ) != VLC_SUCCESS )
+                                      VLC_DTS_HEADER_SIZE ) != VLC_SUCCESS
+             || p_sys->first.i_frame_size == 0 )
             {
                 msg_Dbg( p_dec, "emulated sync word" );
                 block_SkipByte( &p_sys->bytestream );