[vlc-commits] DirectSound: really fix uninitialized mutex (fixes #12845)

Rémi Denis-Courmont git at videolan.org
Sun Nov 30 14:16:12 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 30 15:15:33 2014 +0200| [944d96f758f109bdea7d18a02d95b8cd30f828f3] | committer: Rémi Denis-Courmont

DirectSound: really fix uninitialized mutex (fixes #12845)

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

 modules/audio_output/directsound.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index db870f2..c1152c7 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -634,6 +634,9 @@ static HRESULT Start( vlc_object_t *obj, aout_stream_sys_t *sys,
     }
     free( psz_speaker );
 
+    vlc_mutex_init(&sys->lock);
+    vlc_cond_init(&sys->cond);
+
     if( AOUT_FMT_SPDIF( fmt ) && var_InheritBool( obj, "spdif" ) )
     {
         hr = CreateDSBuffer( obj, sys, VLC_CODEC_SPDIFL,
@@ -770,9 +773,6 @@ static HRESULT Start( vlc_object_t *obj, aout_stream_sys_t *sys,
         }
     }
 
-    vlc_mutex_init(&sys->lock);
-    vlc_cond_init(&sys->cond);
-
     int ret = vlc_clone(&sys->eraser_thread, PlayedDataEraser, (void*) obj,
                         VLC_THREAD_PRIORITY_LOW);
     if( unlikely( ret ) )



More information about the vlc-commits mailing list