vlc | branch: master | Thomas Guillem <[email protected]> | Wed Jul  4 09:21:31 
2018 +0200| [bb3b4b912b1d064c579f4ebd530840e959ef59e5] | committer: Thomas 
Guillem

dec: lock aout/vout when read from DecoderThread

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

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

diff --git a/src/input/decoder.c b/src/input/decoder.c
index bf5fb7d525..e9b96dfe80 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1573,7 +1573,9 @@ static void *DecoderThread( void *p_data )
             paused = p_owner->paused;
             vlc_fifo_Unlock( p_owner->p_fifo );
 
+            vlc_mutex_lock( &p_owner->lock );
             OutputChangePause( p_dec, paused, date );
+            vlc_mutex_unlock( &p_owner->lock );
 
             vlc_restorecancel( canc );
             vlc_fifo_Lock( p_owner->p_fifo );
@@ -1587,7 +1589,9 @@ static void *DecoderThread( void *p_data )
             rate = p_owner->rate;
             vlc_fifo_Unlock( p_owner->p_fifo );
 
+            vlc_mutex_lock( &p_owner->lock );
             OutputChangeRate( p_dec, rate );
+            vlc_mutex_unlock( &p_owner->lock );
 
             vlc_restorecancel( canc );
             vlc_fifo_Lock( p_owner->p_fifo );

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

Reply via email to