[vlc-commits] MMDevice: simplify Close in WinRT mode

Jean-Baptiste Kempf git at videolan.org
Thu Nov 28 14:14:11 CET 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Nov 28 14:11:47 2013 +0100| [7efd04f11d61635326ece18bfe511a6cd49dae44] | committer: Jean-Baptiste Kempf

MMDevice: simplify Close in WinRT mode

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/audio_output/mmdevice.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index aee2615..b806f64 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -821,23 +821,24 @@ static void Close(vlc_object_t *obj)
     audio_output_t *aout = (audio_output_t *)obj;
     aout_sys_t *sys = aout->sys;
 
-    EnterMTA(); /* enter MTA before thread leaves MTA */
+#if !VLC_WINSTORE_APP
+    EnterMTA( obj); /* enter MTA before thread leaves MTA */
     if (sys->dev != NULL)
         CloseDevice(aout);
 
-#if !VLC_WINSTORE_APP
     IMMDeviceEnumerator_Release(sys->it);
     sys->it = NULL;
 
     SetEvent(sys->device_changed);
     vlc_join(sys->thread, NULL);
-#endif
 
     LeaveMTA();
 
-#if !VLC_WINSTORE_APP
     CloseHandle(sys->device_ready);
     CloseHandle(sys->device_changed);
+#else
+    if (sys->dev != NULL)
+        CloseDevice(aout);
 #endif
     free(sys);
 }



More information about the vlc-commits mailing list