[vlc-commits] demux: ts: fix freeze on same es deletion/replacement (#14257)

Francois Cartegnie git at videolan.org
Fri Apr 17 15:02:25 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Apr 17 14:59:44 2015 +0200| [99ec6f7754e9ac8929403631490cee9b4884df94] | committer: Francois Cartegnie

demux: ts: fix freeze on same es deletion/replacement (#14257)

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

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

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 0bc6863..32b39d4 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -5382,6 +5382,22 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_dvbpsipmt )
         } else dvbpsi_pmt_delete( p_dvbpsipmt );
     }
 
+    /* see es_out.c:2045 */
+    for( int i = 0; i < old_es_rm.i_size; i++ )
+    {
+        bool b_reset = false;
+        if( old_es_rm.p_elems[i]->u.p_pes->es.id )
+        {
+            es_out_Control( p_demux->out, ES_OUT_GET_ES_STATE,
+                            old_es_rm.p_elems[i]->u.p_pes->es.id, &b_reset );
+        }
+        if( b_reset )
+        {
+            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
+            break;
+        }
+    }
+
     /* Decref or clean now unused es */
     for( int i = 0; i < old_es_rm.i_size; i++ )
         PIDRelease( p_demux, old_es_rm.p_elems[i] );



More information about the vlc-commits mailing list