[vlc-commits] demux: ts: add SL access unit gathering struct

Francois Cartegnie git at videolan.org
Tue Mar 31 21:22:41 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar 30 22:53:12 2015 +0200| [f26b5f0c2eda448d3334d99386617985cb2cb2db] | committer: Francois Cartegnie

demux: ts: add SL access unit gathering struct

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

 modules/demux/ts.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index 8d06a9e..b4a500d 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -258,6 +258,12 @@ typedef struct
 
     block_t *   p_prepcr_outqueue;
 
+    /* SL AU */
+    struct
+    {
+        block_t     *p_data;
+        block_t     **pp_last;
+    } sl;
 } ts_pes_t;
 
 
@@ -2600,6 +2606,13 @@ static inline void FlushESBuffer( ts_pes_t *p_pes )
         p_pes->p_data = NULL;
         p_pes->pp_last = &p_pes->p_data;
     }
+
+    if( p_pes->sl.p_data )
+    {
+        block_ChainRelease( p_pes->sl.p_data );
+        p_pes->sl.p_data = NULL;
+        p_pes->sl.pp_last = &p_pes->sl.p_data;
+    }
 }
 
 static void ReadyQueuesPostSeek( demux_t *p_demux )
@@ -5618,6 +5631,8 @@ static ts_pes_t *ts_pes_New( demux_t *p_demux )
     pes->p_data = NULL;
     pes->pp_last = &pes->p_data;
     pes->p_prepcr_outqueue = NULL;
+    pes->sl.p_data = NULL;
+    pes->sl.pp_last = &pes->sl.p_data;
 
     return pes;
 }



More information about the vlc-commits mailing list