[vlc-devel] [vlc-commits] input: fix assertion

Steve Lhomme robux4 at gmail.com
Wed Jun 22 10:49:51 CEST 2016


On Thu, Jun 16, 2016 at 11:21 PM, Rémi Denis-Courmont <git at videolan.org> wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jun 17 00:19:25 2016 +0300| [f8acefe5f4401b6addaf7d94eec05336b4eef3c8] | committer: Rémi Denis-Courmont
>
> input: fix assertion
>
> So far, pf_demux is mandatory for unpaced demuxers.

When this code is reached in->p_demux represents the demux (filter) at
the top of the chain. A demux filter has to have a pf_demux to work
but that doesn't mean that the demuxer at the end of the chain
actually has one.

Rather than accessing the "private" p_next we can keep track of the
actual demuxer that was created before the demux filter chain. I'll
submit a patch.

>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f8acefe5f4401b6addaf7d94eec05336b4eef3c8
> ---
>
>  src/input/input.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/input/input.c b/src/input/input.c
> index 6690e7c..50d603e 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -2318,10 +2318,7 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
>                         &in->b_can_pace_control ) )
>          in->b_can_pace_control = false;
>
> -    demux_t *p_demux = in->p_demux;
> -    while (p_demux->p_next)
> -        p_demux = p_demux->p_next;
> -    assert( p_demux->pf_demux != NULL || !in->b_can_pace_control );
> +    assert( in->p_demux->pf_demux != NULL || !in->b_can_pace_control );
>
>      if( !in->b_can_pace_control )
>      {
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits


More information about the vlc-devel mailing list