]> git.sesse.net Git - vlc/commitdiff
es_out*: added ES_OUT_DEL_GROUP
authorLaurent Aimar <fenrir@videolan.org>
Thu, 28 Apr 2005 07:26:04 +0000 (07:26 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 28 Apr 2005 07:26:04 +0000 (07:26 +0000)
 ts.c: use ES_OUT_DEL_GROUP to remove old program.

include/vlc_es_out.h
modules/demux/ts.c
src/input/es_out.c

index c774212f2b8b7cf9299f67e70d0bf58b9cd4aef7..667f8e14e525096fc55f6f08d16e766fa55fa071 100644 (file)
@@ -80,6 +80,8 @@ enum es_out_query_e
     ES_OUT_SET_NEXT_DISPLAY_TIME,   /* arg1=es_out_id_t* arg2=int64_t i_pts(microsecond) */
     /* Set meta data for group (dynamic) */
     ES_OUT_SET_GROUP_META,  /* arg1=int i_group arg2=vlc_meta_t */
+    /* */
+    ES_OUT_DEL_GROUP,       /* arg1=int i_group */
 };
 
 struct es_out_t
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] );
         }
index 08823b3c5d6677ba6c213a18160a93f1b948a1d8..1bfbe36a63328dccc245307ea2776863905cbe2a 100644 (file)
@@ -1363,6 +1363,12 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
             EsOutProgramMeta( out, i_group, p_meta );
             return VLC_SUCCESS;
         }
+        case ES_OUT_DEL_GROUP:
+        {
+            int i_group = (int)va_arg( args, int );
+
+            return EsOutProgramDel( out, i_group );
+        }
 
         default:
             msg_Err( p_sys->p_input, "unknown query in es_out_Control" );