[vlc-commits] packetizer: dts: store substream header size

Francois Cartegnie git at videolan.org
Mon Mar 11 19:39:12 CET 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Mar  8 18:01:00 2019 +0100| [fcea1a345187062c49cf6747c8bff3106f3e5bf4] | committer: Francois Cartegnie

packetizer: dts: store substream header size

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fcea1a345187062c49cf6747c8bff3106f3e5bf4
---

 modules/packetizer/dts_header.c | 6 ++++--
 modules/packetizer/dts_header.h | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/packetizer/dts_header.c b/modules/packetizer/dts_header.c
index 3f24b1d602..b06934326c 100644
--- a/modules/packetizer/dts_header.c
+++ b/modules/packetizer/dts_header.c
@@ -241,18 +241,20 @@ static int dts_header_ParseSubstream( vlc_dts_header_t *p_header,
     bs_skip( &s, 32 /*SYNCEXTSSH*/ + 8 /*UserDefinedBits*/ + 2 /*nExtSSIndex*/ );
     uint8_t bHeaderSizeType = bs_read1( &s );
     uint32_t nuBits4ExSSFsize;
+    uint16_t nuExtSSHeaderSize;
     if( bHeaderSizeType == 0 )
     {
-        bs_skip( &s, 8 /*nuBits4Header*/ );
+        nuExtSSHeaderSize = bs_read( &s, 8 /*nuBits4Header*/ );
         nuBits4ExSSFsize = bs_read( &s, 16 );
     }
     else
     {
-        bs_skip( &s, 12 /*nuBits4Header*/ );
+        nuExtSSHeaderSize = bs_read( &s, 12 /*nuBits4Header*/ );
         nuBits4ExSSFsize = bs_read( &s, 20 );
     }
     memset( p_header, 0, sizeof(*p_header) );
     p_header->syncword = DTS_SYNC_SUBSTREAM;
+    p_header->i_substream_header_size = nuExtSSHeaderSize + 1;
     p_header->i_frame_size = nuBits4ExSSFsize + 1;
     return VLC_SUCCESS;
 }
diff --git a/modules/packetizer/dts_header.h b/modules/packetizer/dts_header.h
index 203cec67b1..2ec623d934 100644
--- a/modules/packetizer/dts_header.h
+++ b/modules/packetizer/dts_header.h
@@ -44,6 +44,7 @@ typedef struct
     unsigned int    i_bitrate;
     unsigned int    i_frame_size;
     unsigned int    i_frame_length;
+    uint32_t        i_substream_header_size;
     uint16_t        i_physical_channels;
     uint16_t        i_chan_mode;
 } vlc_dts_header_t;



More information about the vlc-commits mailing list