[vlc-devel] [vlc-commits] input: fix pf_demux test again

Steve Lhomme robux4 at gmail.com
Wed Jun 22 11:09:57 CEST 2016


On Sat, Jun 18, 2016 at 2:27 PM, Rémi Denis-Courmont <git at videolan.org> wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 18 13:34:08 2016 +0300| [937150bc0f765d1d30e28bf0a19efa5eab344030] | committer: Rémi Denis-Courmont
>
> input: fix pf_demux test again
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=937150bc0f765d1d30e28bf0a19efa5eab344030
> ---
>
>  src/input/input.c |    2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/src/input/input.c b/src/input/input.c
> index 50d603e..c5d0162 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -682,8 +682,6 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
>                               var_InheritBool( p_input, "play-and-pause" );
>
>      demux_t *p_demux = p_input->p->master->p_demux;
> -    while (p_demux->p_next)
> -        p_demux = p_demux->p_next;
>      const bool b_can_demux = p_demux->pf_demux != NULL;

I understand that p_next is supposed to be private. But at this level,
how are we supposed to know if the real demuxer has a pf_demux or not
?

The use of that boolean is only to update i_wakeup by calling
es_out_GetWakeup( p_input->p->p_es_out ). Is it safe to call if for
demuxers that don't have a pf_demux ?

Since earlier we test p_input->p->b_can_pace_control and
p_input->p_demux->pf_demux as mutually exclusive, wouldn't it make
more sense to check for b_can_pace_control for the wakeup time anyway
?

>      while( !input_Stopped( p_input ) && p_input->p->i_state != ERROR_S )
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits


More information about the vlc-devel mailing list