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 );
|