From: Laurent Aimar Date: Thu, 28 Apr 2005 07:26:04 +0000 (+0000) Subject: es_out*: added ES_OUT_DEL_GROUP X-Git-Tag: 0.8.2~368 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=16b435f09be15d5241a6d4897065cd0a605a4992;p=vlc es_out*: added ES_OUT_DEL_GROUP ts.c: use ES_OUT_DEL_GROUP to remove old program. --- diff --git a/include/vlc_es_out.h b/include/vlc_es_out.h index c774212f2b..667f8e14e5 100644 --- a/include/vlc_es_out.h +++ b/include/vlc_es_out.h @@ -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 diff --git a/modules/demux/ts.c b/modules/demux/ts.c index 9ca8d26ff2..11e01d3869 100644 --- a/modules/demux/ts.c +++ b/modules/demux/ts.c @@ -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] ); } diff --git a/src/input/es_out.c b/src/input/es_out.c index 08823b3c5d..1bfbe36a63 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -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" );