[vlc-devel] [PATCH] decoder: don't lock when resetting the aout during RELOAD_DECODER_AOUT

Thomas Guillem thomas at gllm.fr
Wed Sep 4 15:13:59 CEST 2019


On Wed, Sep 4, 2019, at 15:08, Steve Lhomme wrote:
> The decoder and the DecoderThread are dead at this point, so we have nothing
> to protect against.

This function, ReloadDecoder() is called from the DecoderThread(). So, you mean the output thread from the plugin ? 

> ---
>  src/input/decoder.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/src/input/decoder.c b/src/input/decoder.c
> index eb5c0c7c789..16f3c62d524 100644
> --- a/src/input/decoder.c
> +++ b/src/input/decoder.c
> @@ -241,9 +241,7 @@ static int ReloadDecoder( struct decoder_owner 
> *p_owner, bool b_packetizer,
>          assert( p_owner->fmt.i_cat == AUDIO_ES );
>          audio_output_t *p_aout = p_owner->p_aout;
>  
> -        vlc_mutex_lock( &p_owner->lock );
>          p_owner->p_aout = NULL;
> -        vlc_mutex_unlock( &p_owner->lock );
>          if( p_aout )
>          {
>              aout_DecDelete( p_aout );
> -- 
> 2.17.1
> 
> _______________________________________________
> 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