[vlc-commits] demux: ts: set global es count on IOD ES creation

Francois Cartegnie git at videolan.org
Mon Aug 19 16:49:42 CEST 2019


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 19 14:59:46 2019 +0200| [1fcf2b7c473aedf7bc359e138bed1cda9b2ca679] | committer: Francois Cartegnie

demux: ts: set global es count on IOD ES creation

MPEG SL could not longer start

(cherry picked from commit 36aa45ab8cd5f56ff751319dd23de0c7865a8423)

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

 modules/demux/mpeg/ts_sl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/demux/mpeg/ts_sl.c b/modules/demux/mpeg/ts_sl.c
index 94a56bb952..c33960cc28 100644
--- a/modules/demux/mpeg/ts_sl.c
+++ b/modules/demux/mpeg/ts_sl.c
@@ -140,6 +140,7 @@ void SLPackets_Section_Handler( demux_t *p_demux,
                                 void *p_pes_cbdata )
 {
     VLC_UNUSED(p_sectiondata); VLC_UNUSED(i_sectiondata);
+    demux_sys_t *p_sys = p_demux->p_sys;
     ts_stream_t *p_pes = (ts_stream_t *) p_pes_cbdata;
     ts_pmt_t *p_pmt = p_pes->p_es->p_program;
 
@@ -176,9 +177,14 @@ void SLPackets_Section_Handler( demux_t *p_demux,
                     p_es->fmt = fmt;
 
                     if( p_es->id )
+                    {
                         es_out_Del( p_demux->out, p_es->id );
+                        p_sys->i_pmt_es--;
+                    }
                     p_es->fmt.b_packetized = true; /* Split by access unit, no sync code */
                     p_es->id = es_out_Add( p_demux->out, &p_es->fmt );
+                    if( p_es->id )
+                        p_sys->i_pmt_es++;
                     b_changed = true;
                 }
                 else



More information about the vlc-commits mailing list