[vlc-devel] [PATCH] es_out: do not start decoder-wait twice

Thomas Guillem thomas at gllm.fr
Sat Mar 21 15:30:11 CET 2015


It fixes the assert when seeking on android.

But sometimes I got no audio while seeking and got a lot of log like
this:
[80baa634] core decoder: Timestamp conversion failed (delay 1500000,
buffering 100000, bound 3000000)
[80baa634] core decoder: Could not convert timestamp 53170676088
[80baa634] core decoder: discarded audio buffer

I think that we still need to flush the decoder in EsOutChangePosition
even if p_sys->b_buffering is true.

On Sat, Mar 21, 2015, at 12:25, Rémi Denis-Courmont wrote:
> ---
>  src/input/es_out.c | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/src/input/es_out.c b/src/input/es_out.c
> index 1446476..9a76467 100644
> --- a/src/input/es_out.c
> +++ b/src/input/es_out.c
> @@ -569,17 +569,20 @@ static void EsOutChangePosition( es_out_t *out )
>  
>      input_SendEventCache( p_sys->p_input, 0.0 );
>  
> -    for( int i = 0; i < p_sys->i_es; i++ )
> +    if( !p_sys->b_buffering )
>      {
> -        es_out_id_t *p_es = p_sys->es[i];
> +        for( int i = 0; i < p_sys->i_es; i++ )
> +        {
> +            es_out_id_t *p_es = p_sys->es[i];
>  
> -        if( !p_es->p_dec )
> -            continue;
> +            if( p_es->p_dec == NULL )
> +                continue;
>  
> -        input_DecoderStartWait( p_es->p_dec );
> +            input_DecoderStartWait( p_es->p_dec );
>  
> -        if( p_es->p_dec_record )
> -            input_DecoderStartWait( p_es->p_dec_record );
> +            if( p_es->p_dec_record != NULL )
> +                input_DecoderStartWait( p_es->p_dec_record );
> +        }
>      }
>  
>      for( int i = 0; i < p_sys->i_pgrm; i++ )
> -- 
> 2.1.4
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list