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

Steve Lhomme robux4 at ycbcr.xyz
Fri Sep 6 12:19:50 CEST 2019


The decoder and the DecoderThread are dead at this point, so we have nothing
to protect against.
---
 src/input/decoder.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 288059e313c..b6229b33595 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -240,10 +240,8 @@ static int DecoderThread_Reload( struct decoder_owner *p_owner, bool b_packetize
     {
         assert( p_owner->fmt.i_cat == AUDIO_ES );
         audio_output_t *p_aout = p_owner->p_aout;
-
-        vlc_mutex_lock( &p_owner->lock );
+        // no need to lock, the decoder and DecoderOutputThreads are dead
         p_owner->p_aout = NULL;
-        vlc_mutex_unlock( &p_owner->lock );
         if( p_aout )
         {
             aout_DecDelete( p_aout );
-- 
2.17.1



More information about the vlc-devel mailing list