[vlc-devel] [PATCH] decoder: flush the vout before flushing the decoder

Rémi Denis-Courmont remi at remlab.net
Mon Nov 30 11:20:15 CET 2015


Le 2015-11-30 11:25, Thomas Guillem a écrit :
> ---
>  src/input/decoder.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/input/decoder.c b/src/input/decoder.c
> index 0f08198..c25a130 100644
> --- a/src/input/decoder.c
> +++ b/src/input/decoder.c
> @@ -1278,6 +1278,10 @@ static void DecoderProcessFlush( decoder_t 
> *p_dec )
>      if( p_packetizer != NULL && p_packetizer->pf_flush != NULL )
>          p_packetizer->pf_flush( p_packetizer );
>
> +    /* see vout_Flush comment in input_DecoderDelete() */

Uh? How? If the decoder gets stuck decoding as in that comment, then 
this code cannot be reached until the decoder gets unstuck. So that 
seems like a catch-22. AFAIK, if the decoder locks up, then the only 
avenue of recovery is to stop.

If alternatively the decoder gets stuck flushing, then either the 
decoder plug-in:
- has a bug,
- needs to cancel pending picture allocations *within* pf_flush, or
- both.

So overall, I don't understand this patch.

> +    if( p_owner->p_vout )
> +        vout_Flush( p_owner->p_vout, VLC_TS_INVALID+1 );
> +
>      if ( p_dec->pf_flush != NULL )
>          p_dec->pf_flush( p_dec );
>      else

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list