changeset 22334:1c7f753ef2c9

Fix wrong typecast, which can cause MPlayer crash
author voroshil
date Mon, 26 Feb 2007 17:21:17 +0000
parents d4c43b058d4b
children 2f43fee89f0e
files loader/dshow/outputpin.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/loader/dshow/outputpin.c	Sun Feb 25 23:01:13 2007 +0000
+++ b/loader/dshow/outputpin.c	Mon Feb 26 17:21:17 2007 +0000
@@ -578,7 +578,7 @@
  */
 static HRESULT STDCALL COutputMemPin_QueryInterface(IUnknown* This, const GUID* iid, void** ppv)
 {
-    COutputPin* p = (COutputPin*)This;
+    COutputMemPin* p = (COutputMemPin*)This;
 
     Debug printf("COutputMemPin_QueryInterface(%p) called\n", This);
     if (!ppv)
@@ -599,8 +599,8 @@
     }*/
     if(!memcmp(iid, &IID_IMemInputPin, 16))
     {
-	*ppv = p->mempin;
-	p->mempin->vt->AddRef(This);
+	*ppv = p;
+	p->vt->AddRef(This);
 	return 0;
     }
     Debug printf("Unknown interface : %08x-%04x-%04x-%02x%02x-" \