Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
da002b53 by Thomas Guillem at 2024-09-16T09:31:47+02:00
dts_header: initialize SUBSTREAM_LBR size to 0

It's a substream and can't work alone, so a size of 0 is legitimate.

Fixes #28773 (Use of uninitialised value)

(cherry picked from commit b23f09b258dc63c2221af502ec856630f68817e5)
Signed-off-by: Thomas Guillem <[email protected]>

- - - - -
9682584b by Thomas Guillem at 2024-09-16T09:31:58+02:00
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 <[email protected]>

- - - - -


2 changed files:

- modules/packetizer/dts.c
- modules/packetizer/dts_header.c


Changes:

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


=====================================
modules/packetizer/dts_header.c
=====================================
@@ -342,6 +342,7 @@ static int dts_header_ParseLBRExtSubstream( 
vlc_dts_header_t *p_header,
     bs_skip( &s, 16 );
     uint16_t nLBRScaledBitRate_LSW = bs_read( &s, 16 );
     p_header->i_bitrate = nLBRScaledBitRate_LSW | ((nLBRBitRateMSnybbles & 
0xF0) << 12);
+    p_header->i_frame_size = 0;
     return VLC_SUCCESS;
 }
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0490fe5396ed6eb3a731d40f9fd2af5b07cc220f...9682584bec494ba5f4b3fea002bfaeee9780e384

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/0490fe5396ed6eb3a731d40f9fd2af5b07cc220f...9682584bec494ba5f4b3fea002bfaeee9780e384
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to