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

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


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

DirectSound: really fix uninitialized mutex (fixes #12845)

(cherry picked from commit 944d96f758f109bdea7d18a02d95b8cd30f828f3)

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

 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 39ae953..7e26474 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -633,6 +633,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,
@@ -769,9 +772,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