]> git.sesse.net Git - vlc/commitdiff
audio_output: Take the input_fifos lock where needed in aout_InputPlay.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Mon, 11 Aug 2008 23:17:09 +0000 (01:17 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Mon, 11 Aug 2008 23:17:27 +0000 (01:17 +0200)
(Should fix an other bunch of crash report in apple-bugreport).

src/audio_output/input.c

index c68eab657eeeef2ed808cda2393a0087a4addd4d..95681e8fd2439fee82b9b5021b6847db89d4e213 100644 (file)
@@ -484,6 +484,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
         uint8_t     *p_first_byte_to_mix;
 
         vlc_mutex_lock( &p_aout->mixer_lock );
+        vlc_mutex_lock( &p_aout->input_fifos_lock );
 
         /* A little trick to avoid loosing our input fifo */
         aout_FifoInit( p_aout, &dummy_fifo, p_aout->mixer.mixer.i_rate );
@@ -495,6 +496,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
         p_input->p_first_byte_to_mix = p_first_byte_to_mix;
         p_input->fifo = fifo;
 
+        vlc_mutex_unlock( &p_aout->input_fifos_lock );
         vlc_mutex_unlock( &p_aout->mixer_lock );
     }