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

Steve Lhomme git at videolan.org
Thu Sep 12 15:57:09 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Sep  3 10:29:18 2019 +0200| [910727b22ee34e8e0f6992b0519568fe445a0e0a] | committer: Steve Lhomme

decoder: don't lock when resetting the aout during RELOAD_DECODER_AOUT

The decoder and the DecoderThread are dead at this point, so we have nothing
to protect against.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=910727b22ee34e8e0f6992b0519568fe445a0e0a
---

 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 288059e313..b6229b3359 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 );



More information about the vlc-commits mailing list