[vlc-commits] demux: ts: fix missing old es removal whit same pid/pmt (fix #17103)

Francois Cartegnie git at videolan.org
Thu Jun 30 09:53:12 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jun 30 09:51:26 2016 +0200| [a05aba9b4c41acd29fcc7284f57aec8e5f3a7ceb] | committer: Francois Cartegnie

demux: ts: fix missing old es removal whit same pid/pmt (fix #17103)

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

 modules/demux/mpeg/ts_psi.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/mpeg/ts_psi.c b/modules/demux/mpeg/ts_psi.c
index 21ab59c..906ef5d 100644
--- a/modules/demux/mpeg/ts_psi.c
+++ b/modules/demux/mpeg/ts_psi.c
@@ -1626,8 +1626,11 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_dvbpsipmt )
                 else
                 {
                     ts_pes_es_t *p_new = ts_pes_Extract_es( p_pes, p_pmt );
+                    ts_pes_es_t *p_old = ts_pes_Extract_es( pespid->u.p_pes, p_pmt );
                     ts_pes_Add_es( pespid->u.p_pes, p_new, false );
+                    assert(p_old == p_existing_es);
                     assert(ts_pes_Count_es(p_pes->p_es, false, NULL) == 0);
+                    ts_pes_Add_es( p_pes, p_old, false );
                     ts_pes_Del( p_demux, p_pes );
                 }
             }



More information about the vlc-commits mailing list