[vlc-devel] commit: Fixed infinite loop if alsa was closed before playing any audio. ( Laurent Aimar )
git version control
git at videolan.org
Wed Jul 9 23:56:51 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Jul 9 21:58:25 2008 +0000| [a82e5fcaf2e1520a3f5bc7af1a8b163c66086a60]
Fixed infinite loop if alsa was closed before playing any audio.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a82e5fcaf2e1520a3f5bc7af1a8b163c66086a60
---
modules/audio_output/alsa.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 80dc2ca..e16a05f 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;
More information about the vlc-devel
mailing list