[vlc-devel] [PATCH] [RFC] demux: remove pf_demux as NULL possiblity
Rémi Denis-Courmont
remi at remlab.net
Mon Jun 6 17:58:15 CEST 2016
Le 2016-06-06 13:33, Steve Lhomme a écrit :
> pf_demux is never NULL in demuxers or access demuxers
% git grep "pf_demux = NULL"
modules/access/alsa.c: demux->pf_demux = NULL;
modules/access/decklink.cpp: demux->pf_demux = NULL;
modules/access/linsys/linsys_hdsdi.c: p_demux->pf_demux = NULL;
modules/access/pulse.c: demux->pf_demux = NULL;
modules/access/rdp.c: p_demux->pf_demux = NULL;
modules/access/screen/wayland.c: demux->pf_demux = NULL;
modules/access/v4l2/demux.c: demux->pf_demux = NULL;
modules/access/v4l2/radio.c: demux->pf_demux = NULL;
modules/access/vnc.c: p_demux->pf_demux = NULL;
modules/access/wasapi.c: demux->pf_demux = NULL;
> ---
> include/vlc_demux.h | 3 ---
> src/input/input.c | 4 ----
> 2 files changed, 7 deletions(-)
>
> diff --git a/include/vlc_demux.h b/include/vlc_demux.h
> index f4baeea..5be93b9 100644
> --- a/include/vlc_demux.h
> +++ b/include/vlc_demux.h
> @@ -298,9 +298,6 @@ VLC_API int demux_vaControlHelper( stream_t *,
> int64_t i_start, int64_t i_end,
>
> VLC_USED static inline int demux_Demux( demux_t *p_demux )
> {
> - if( !p_demux->pf_demux )
> - return VLC_DEMUXER_SUCCESS;
> -
> return p_demux->pf_demux( p_demux );
> }
>
> diff --git a/src/input/input.c b/src/input/input.c
> index d4acfda..9c1fb87 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -703,8 +703,6 @@ static void MainLoop( input_thread_t *p_input,
> bool b_interactive )
>
> MainLoopDemux( p_input, &b_force_update );
>
> - if( p_input->p->master->p_demux->pf_demux != NULL )
> - i_wakeup = es_out_GetWakeup(
> p_input->p->p_es_out );
> if( b_force_update )
> i_intf_update = 0;
> }
> @@ -2352,8 +2350,6 @@ static input_source_t *InputSourceNew(
> input_thread_t *p_input,
> &in->b_can_pace_control ) )
> in->b_can_pace_control = false;
>
> - assert( in->p_demux->pf_demux != NULL || !in->b_can_pace_control
> );
> -
> if( in->p_demux->s != NULL )
> {
> if( !in->b_can_pace_control )
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list