[vlc-devel] [PATCH 1/2] decoder: don't cancel a non started vout

Steve Lhomme robux4 at ycbcr.xyz
Mon Oct 21 15:42:15 CEST 2019


On 2019-10-21 15:34, Rémi Denis-Courmont wrote:
> This seems very backward. We already have reuse handling in the resource 
> code, and it's unavoidable there to support cross-input or cross-ES 
> reuse. So I don't think the decoder should duplicate functionality.

So we should remove the assert(s) that forbid this call, the 
"sys->display" one(s). This assert is used to tell if the display module 
exists but also the display thread is started.

> Le 21 octobre 2019 16:12:27 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a 
> écrit :
> 
>     It will assert from the missing sys->display.
> 
>     We don't need to cancel a pool since the display is not started, we could never
>     use the pool anyway.
>     ------------------------------------------------------------------------
>       src/input/decoder.c | 2 +-
>       1 file changed, 1 insertion(+), 1 deletion(-)
> 
>     diff --git a/src/input/decoder.c b/src/input/decoder.c
>     index f979fca5e1f..2d8fb57736c 100644
>     --- a/src/input/decoder.c
>     +++ b/src/input/decoder.c
>     @@ -870,7 +870,7 @@ static void DecoderThread_AbortPictures( decoder_t *p_dec, bool b_abort )
>           struct decoder_owner *p_owner = dec_get_owner( p_dec );
>       
>           vlc_mutex_lock( &p_owner->lock ); // called in DecoderThread
>     -    if( p_owner->p_vout != NULL )
>     +    if( p_owner->p_vout != NULL && p_owner->vout_thread_started)
>               vout_Cancel( p_owner->p_vout, b_abort );
>           vlc_mutex_unlock( &p_owner->lock );
>       }
> 
> 
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser 
> ma brièveté.
> 
> _______________________________________________
> 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