[vlc-commits] mmdevice: avoid incorrect assertion
Rémi Denis-Courmont
git at videolan.org
Tue Feb 11 17:24:07 CET 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb 11 18:22:40 2014 +0200| [2017370587f530cbea87c3bfb43695e56b3c27aa] | committer: Rémi Denis-Courmont
mmdevice: avoid incorrect assertion
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2017370587f530cbea87c3bfb43695e56b3c27aa
---
modules/audio_output/mmdevice.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 872950a..2f41567 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -1033,7 +1033,10 @@ static int Open(vlc_object_t *obj)
goto error;
}
- DeviceSelect(aout, NULL);
+ EnterCriticalSection(&sys->lock);
+ while (sys->device != NULL)
+ SleepConditionVariableCS(&sys->ready, &sys->lock, INFINITE);
+ LeaveCriticalSection(&sys->lock);
LeaveMTA(); /* Leave MTA after thread has entered MTA */
#else
sys->client = var_InheritAddress(aout, "mmdevice-audioclient");
More information about the vlc-commits
mailing list