From: Laurent Aimar Date: Wed, 9 Jul 2008 21:58:25 +0000 (+0000) Subject: Fixed infinite loop if alsa was closed before playing any audio. X-Git-Tag: 0.9.0-test2~79 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a82e5fcaf2e1520a3f5bc7af1a8b163c66086a60;p=vlc Fixed infinite loop if alsa was closed before playing any audio. --- diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c index 80dc2ca180..e16a05f785 100644 --- a/modules/audio_output/alsa.c +++ b/modules/audio_output/alsa.c @@ -730,12 +730,15 @@ static void Close( vlc_object_t *p_this ) struct aout_sys_t * p_sys = p_aout->output.p_sys; int i_snd_rc; + /* Make sure that the thread will stop once it is waken up */ + vlc_object_kill( p_aout ); + /* make sure the audio output thread is waken up */ vlc_mutex_lock( &p_aout->output.p_sys->lock ); vlc_cond_signal( &p_aout->output.p_sys->wait ); vlc_mutex_unlock( &p_aout->output.p_sys->lock ); - vlc_object_kill( p_aout ); + /* */ vlc_thread_join( p_aout ); p_aout->b_die = false;