[vlc-commits] [Git][videolan/vlc][master] 2 commits: dts_header: initialize SUBSTREAM_LBR size to 0

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Sep 14 09:11:26 UTC 2024



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
b23f09b2 by Thomas Guillem at 2024-09-14T08:58:11+00: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)

- - - - -
16b31aa5 by Thomas Guillem at 2024-09-14T08:58:11+00:00
packetizer: dts: check for frame_size for the first sync

Only substreams are allowed to have a frame_size of 0.

- - - - -


2 changed files:

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


Changes:

=====================================
modules/packetizer/dts.c
=====================================
@@ -207,7 +207,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
=====================================
@@ -341,6 +341,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/4e64551d00d1f2ee3bbb58bcd42e4c13662534b5...16b31aa57e3919dbe661c213868dee4b8bc1e3bd

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4e64551d00d1f2ee3bbb58bcd42e4c13662534b5...16b31aa57e3919dbe661c213868dee4b8bc1e3bd
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list