[vlc-devel] [PATCH] mmdevice: don't hard crash when CoInitializeEx fails on Start, show the reason

Steve Lhomme robUx4 at videolabs.io
Wed Mar 18 09:53:24 CET 2015


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

diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index d9d3573..3df2686 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -1079,7 +1079,8 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
     s->owner.device = sys->dev;
     s->owner.activate = ActivateDevice;
 
-    EnterMTA();
+    if( TryEnterMTA( aout ) )
+        return -1;
     for (;;)
     {
         HRESULT hr;
-- 
2.3.2




More information about the vlc-devel mailing list