[vlc-devel] commit: audio_output: Add a missing lock. (Pierre d'Herbemont )

git version control git at videolan.org
Sat Aug 9 23:57:42 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Aug  9 23:56:51 2008 +0200| [205a9fa8cfb37dc9ed8f83d51667102a02be49e0] | committer: Pierre d'Herbemont 

audio_output: Add a missing lock.

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

 src/audio_output/dec.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index a9eb16a..158932b 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -105,6 +105,7 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
     if( p_replay_gain )
         p_input->replay_gain = *p_replay_gain;
 
+    vlc_mutex_lock( &p_aout->input_fifos_lock );
     p_aout->pp_inputs[p_aout->i_nb_inputs] = p_input;
     p_aout->i_nb_inputs++;
 
@@ -149,6 +150,7 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
     }
 
     aout_InputNew( p_aout, p_input );
+    vlc_mutex_unlock( &p_aout->input_fifos_lock );
 
     vlc_mutex_unlock( &p_aout->mixer_lock );
     p_input->i_desync = var_CreateGetInteger( p_this, "audio-desync" ) * 1000;




More information about the vlc-devel mailing list