vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue Mar 17 
22:41:46 2015 +0200| [16e3039284c90fae4a46c44f64422371039fa553] | committer: 
Rémi Denis-Courmont

decoder: remove invalid call, fix races

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.

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

 src/input/decoder.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index ad54288..3c8a32a 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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 )
         {

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to