[vlc-commits] dec: lock aout/vout when read from DecoderThread

Thomas Guillem git at videolan.org
Wed Jul 4 09:36:59 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | 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 );



More information about the vlc-commits mailing list