[vlc-devel] [PATCH] decoder: fix pause+close deadlock for decoders waiting internally for buffers

Rémi Denis-Courmont remi at remlab.net
Wed Jul 29 22:28:14 CEST 2020


Le keskiviikkona 29. heinäkuuta 2020, 11.04.13 EEST Steve Lhomme a écrit :
> When paused the decoder decodes until it exhausts its available buffers then
> waits until new buffers are available. When seeking we force flushing the
> vout which releases the buffers the decoder is waiting for.
> 
> When closing while pause we didn't flush the vout so the decoder was still
> waiting for buffers even though it's not going to use them (or display
> them). So we do the same flushing to automatically release the used/pending
> buffers. ---
>  src/input/decoder.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/src/input/decoder.c b/src/input/decoder.c
> index 141120d6395..464ceff046e 100644
> --- a/src/input/decoder.c
> +++ b/src/input/decoder.c
> @@ -2153,6 +2153,22 @@ void vlc_input_decoder_Delete( vlc_input_decoder_t
> *p_owner ) {
>          if (p_owner->out_pool)
>              picture_pool_Cancel( p_owner->out_pool, true );
> +
> +        if( p_owner->paused )

I don't exactly follow why this check is needed here, nor in the existing flush 
code. It's debatable whether we should flush on delete, but assuming so, then I 
don't see what pause has to do with it, TBH.

-- 
http://www.remlab.net/





More information about the vlc-devel mailing list