]> git.sesse.net Git - vlc/commitdiff
Fixed infinite loop if alsa was closed before playing any audio.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 9 Jul 2008 21:58:25 +0000 (21:58 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 9 Jul 2008 21:59:00 +0000 (21:59 +0000)
modules/audio_output/alsa.c

index 80dc2ca180b2be8bd7b30f2469098bebe35285ee..e16a05f78543c0b3397431cfe6be22ec4db28e57 100644 (file)
@@ -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;