]> git.sesse.net Git - vlc/blobdiff - modules/demux/ts.c
es_out*: added ES_OUT_DEL_GROUP
[vlc] / modules / demux / ts.c
index 9ca8d26ff26f8c769689262a2598670229de3acd..11e01d3869f92dacead839973c5e0c641bc490a9 100644 (file)
@@ -2941,6 +2941,7 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
         /* Delete PMT pid */
         for( i = 0; i < i_pmt_rm; i++ )
         {
+            int i_prg;
             if( p_sys->b_dvb_control )
             {
                 if( stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
@@ -2949,6 +2950,13 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
                     p_sys->b_dvb_control = VLC_FALSE;
             }
 
+            for( i_prg = 0; i_prg < pmt_rm[i]->psi->i_prg; i_prg++ )
+            {
+                const int i_number = pmt_rm[i]->psi->prg[i_prg]->i_number;
+                if( i_number != 0 )
+                    es_out_Control( p_demux->out, ES_OUT_DEL_GROUP, i_number );
+            }
+
             PIDClean( p_demux->out, &p_sys->pid[pmt_rm[i]->i_pid] );
             TAB_REMOVE( p_sys->i_pmt, p_sys->pmt, pmt_rm[i] );
         }