[vlc-commits] ALSA: small simplification

Rémi Denis-Courmont git at videolan.org
Tue Apr 5 20:58:15 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr  5 20:40:43 2011 +0300| [5bb155084719f2f61cca37d5d11399866df3f440] | committer: Rémi Denis-Courmont

ALSA: small simplification

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

 modules/audio_output/alsa.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 5f9205c..2a2017b 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -728,6 +728,7 @@ static void Close( vlc_object_t *p_this )
     vlc_join( p_sys->thread, NULL );
     vlc_sem_destroy( &p_sys->wait );
 
+    snd_pcm_drop( p_sys->p_snd_pcm );
     snd_pcm_close( p_sys->p_snd_pcm );
 #ifdef ALSA_DEBUG
     snd_output_close( p_sys->p_snd_stderr );
@@ -735,11 +736,6 @@ static void Close( vlc_object_t *p_this )
     free( p_sys );
 }
 
-static void pcm_drop(void *pcm)
-{
-    snd_pcm_drop(pcm);
-}
-
 /*****************************************************************************
  * ALSAThread: asynchronous thread used to DMA the data to the device
  *****************************************************************************/
@@ -752,12 +748,10 @@ static void* ALSAThread( void *data )
     vlc_sem_wait( &p_sys->wait );
     mwait( p_sys->start_date - AOUT_PTS_TOLERANCE / 4 );
 
-    vlc_cleanup_push( pcm_drop, p_sys->p_snd_pcm );
     for(;;)
         ALSAFill( p_aout );
 
     assert(0);
-    vlc_cleanup_pop();
 }
 
 /*****************************************************************************



More information about the vlc-commits mailing list