[vlc-commits] packetizer: dts: split second sync substream state

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


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar 11 18:08:02 2019 +0100| [1f42cfc37622602babf1f50338a19981150f2457] | committer: Francois Cartegnie

packetizer: dts: split second sync substream state

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

 modules/packetizer/dts.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/packetizer/dts.c b/modules/packetizer/dts.c
index 3d557b2589..16673cd84e 100644
--- a/modules/packetizer/dts.c
+++ b/modules/packetizer/dts.c
@@ -75,6 +75,7 @@ typedef struct
 enum
 {
     STATE_SYNC_SUBSTREAM_EXTENSIONS = STATE_CUSTOM_FIRST,
+    STATE_NEXT_SYNC_SUBSTREAM_EXTENSIONS,
 };
 
 static void PacketizeFlush( decoder_t *p_dec )
@@ -285,14 +286,20 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t **pp_block )
                                               VLC_DTS_HEADER_SIZE )
                         == VLC_SUCCESS && next_header.syncword == DTS_SYNC_SUBSTREAM )
                     {
-                        p_dec->fmt_out.i_profile = PROFILE_DTS_HD;
                         p_sys->i_input_size += next_header.i_frame_size;
+                        p_sys->i_state = STATE_NEXT_SYNC_SUBSTREAM_EXTENSIONS;
+                        break;
                     }
                 }
                 p_sys->i_state = STATE_GET_DATA;
             }
             break;
 
+        case STATE_NEXT_SYNC_SUBSTREAM_EXTENSIONS:
+            p_dec->fmt_out.i_profile = PROFILE_DTS_HD;
+            p_sys->i_state = STATE_GET_DATA;
+            break;
+
         case STATE_GET_DATA:
             /* Make sure we have enough data. */
             if( block_WaitBytes( &p_sys->bytestream,



More information about the vlc-commits mailing list