]> git.sesse.net Git - vlc/commitdiff
decoder: remove invalid call, fix races
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 17 Mar 2015 20:41:46 +0000 (22:41 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 19 Mar 2015 17:56:09 +0000 (19:56 +0200)
Calling input_DecoderStopWait() from the decoder thread makes no sense
as it signals a condition variable that only the decoder thread itself
would ever wait on.

More importantly, the call breaks assumptions made by the input thread.
For instance, input_DecoderDecode() assumes p_owner->b_waiting is only
changed by the decoder owner (i.e. input) thread.

src/input/decoder.c

index ad5428824c0229f8969a07bf2849ed5c8daf9287..3c8a32ae5873f1d5b7c82503001b97a54ceca591 100644 (file)
@@ -878,8 +878,6 @@ static void *DecoderThread( void *p_data )
          * If you need one, be sure to push cleanup of p_block. */
         bool end_wait = !p_block || p_block->i_flags & BLOCK_FLAG_CORE_EOS;
         DecoderSignalWait( p_dec, end_wait );
-        if (end_wait)
-            input_DecoderStopWait( p_dec );
 
         if( p_block )
         {