vlc | branch: master | Thomas Guillem <[email protected]> | Thu Sep  3 10:20:42 
2015 +0200| [7db77e96960c6a57a523cf9add691e861021235f] | committer: Thomas 
Guillem

decoder: add a cancellation point in DecoderThread

When the thread is cancelled, it will be exited before processing all input
blocks.

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

 src/input/decoder.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 25eac79..0fad3f9 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1416,6 +1416,8 @@ static void *DecoderThread( void *p_data )
         vlc_cond_signal( &p_owner->wait_acknowledge );
         vlc_mutex_unlock( &p_owner->lock );
         vlc_fifo_CleanupPush( p_owner->p_fifo );
+        /* Check if thread is cancelled before processing input blocks */
+        vlc_testcancel();
 
         vlc_cond_signal( &p_owner->wait_fifo );
 

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

Reply via email to