[vlc-commits] directsound: fix crash when no audio card is present on the system

Rafaël Carré git at videolan.org
Thu Sep 5 15:45:32 CEST 2013


vlc/vlc-2.1 | branch: master | Rafaël Carré <funman at videolan.org> | Wed Sep  4 18:14:30 2013 +0200| [7d8d075b54259ba580edbde7021228ecbef7aefe] | committer: Jean-Baptiste Kempf

directsound: fix crash when no audio card is present on the system

(cherry picked from commit 7771a49e7261e9077c9aecb458293982a3607ca1)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=7d8d075b54259ba580edbde7021228ecbef7aefe
---

 modules/audio_output/directx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index 48f3251..1bb719b 100644
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -384,7 +384,8 @@ static void Stop( audio_output_t *p_aout )
         IDirectSoundNotify_Release(p_sys->p_notify );
     p_sys->p_notify = NULL;
 
-    IDirectSoundBuffer_Stop( p_sys->p_dsbuffer );
+    if( p_sys->p_dsbuffer )
+        IDirectSoundBuffer_Stop( p_sys->p_dsbuffer );
     /* release the secondary buffer */
     DestroyDSBuffer( p_aout );
 



More information about the vlc-commits mailing list