[vlc-commits] winstore: fix activation callback parameters handling

Rémi Denis-Courmont git at videolan.org
Sun Mar 1 10:12:05 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar  1 11:11:47 2015 +0200| [d7f4d076ecfda360fb52f6dea424839e1359becc] | committer: Rémi Denis-Courmont

winstore: fix activation callback parameters handling

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

 modules/audio_output/winstore.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/winstore.c b/modules/audio_output/winstore.c
index 988cada..4734f39 100644
--- a/modules/audio_output/winstore.c
+++ b/modules/audio_output/winstore.c
@@ -101,8 +101,13 @@ static void Flush(audio_output_t *aout, bool wait)
 static HRESULT ActivateDevice(void *opaque, REFIID iid, PROPVARIANT *actparms,
                               void **restrict pv)
 {
-    (void) iid; (void) actparms;
-    IAudioClient* client = (IAudioClient*)opaque;
+    IAudioClient *client = opaque;
+
+    if (!IsEqualIID(iid, &IID_IAudioClient))
+        return E_NOINTERFACE;
+    if (actparms != NULL)
+        return E_INVALIDARG;
+
     IAudioClient_AddRef(client);
     *pv = opaque;
 



More information about the vlc-commits mailing list