Mercurial > mplayer.hg
comparison loader/dshow/outputpin.c @ 22334:1c7f753ef2c9
Fix wrong typecast, which can cause MPlayer crash
author | voroshil |
---|---|
date | Mon, 26 Feb 2007 17:21:17 +0000 |
parents | e95af173a63b |
children | 49f01f8fbd60 |
comparison
equal
deleted
inserted
replaced
22333:d4c43b058d4b | 22334:1c7f753ef2c9 |
---|---|
576 * Make sure to call Release on received interface when you are done | 576 * Make sure to call Release on received interface when you are done |
577 * | 577 * |
578 */ | 578 */ |
579 static HRESULT STDCALL COutputMemPin_QueryInterface(IUnknown* This, const GUID* iid, void** ppv) | 579 static HRESULT STDCALL COutputMemPin_QueryInterface(IUnknown* This, const GUID* iid, void** ppv) |
580 { | 580 { |
581 COutputPin* p = (COutputPin*)This; | 581 COutputMemPin* p = (COutputMemPin*)This; |
582 | 582 |
583 Debug printf("COutputMemPin_QueryInterface(%p) called\n", This); | 583 Debug printf("COutputMemPin_QueryInterface(%p) called\n", This); |
584 if (!ppv) | 584 if (!ppv) |
585 return E_INVALIDARG; | 585 return E_INVALIDARG; |
586 | 586 |
597 AddRef((IUnknown*)ptr); | 597 AddRef((IUnknown*)ptr); |
598 return 0; | 598 return 0; |
599 }*/ | 599 }*/ |
600 if(!memcmp(iid, &IID_IMemInputPin, 16)) | 600 if(!memcmp(iid, &IID_IMemInputPin, 16)) |
601 { | 601 { |
602 *ppv = p->mempin; | 602 *ppv = p; |
603 p->mempin->vt->AddRef(This); | 603 p->vt->AddRef(This); |
604 return 0; | 604 return 0; |
605 } | 605 } |
606 Debug printf("Unknown interface : %08x-%04x-%04x-%02x%02x-" \ | 606 Debug printf("Unknown interface : %08x-%04x-%04x-%02x%02x-" \ |
607 "%02x%02x%02x%02x%02x%02x\n", | 607 "%02x%02x%02x%02x%02x%02x\n", |
608 iid->f1, iid->f2, iid->f3, | 608 iid->f1, iid->f2, iid->f3, |