diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 0c1b7cc623f..48f24973d69 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -1210,7 +1210,7 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size if (SUCCEEDED(InputPin_Init(InputPin_Vtbl, pPinInfo, vtbl, pCritSec, allocator, pPinImpl))) { - *ppPin = (IPin *)pPinImpl; + *ppPin = &pPinImpl->pin.IPin_iface; return S_OK; } diff --git a/dlls/strmbase/pospass.c b/dlls/strmbase/pospass.c index 42900c685af..45eb23482de 100644 --- a/dlls/strmbase/pospass.c +++ b/dlls/strmbase/pospass.c @@ -152,9 +152,9 @@ static HRESULT SeekOuter_QueryInterface(PassThruImpl *This, REFIID riid, LPVOID { HRESULT hr; - IUnknown_AddRef((IUnknown *)&(This->IUnknown_inner)); - hr = IUnknown_QueryInterface((IUnknown *)&(This->IUnknown_inner), riid, ppv); - IUnknown_Release((IUnknown *)&(This->IUnknown_inner)); + IUnknown_AddRef(&This->IUnknown_inner); + hr = IUnknown_QueryInterface(&This->IUnknown_inner, riid, ppv); + IUnknown_Release(&This->IUnknown_inner); This->bAggregatable = TRUE; return hr; } @@ -163,21 +163,21 @@ static HRESULT SeekOuter_QueryInterface(PassThruImpl *This, REFIID riid, LPVOID return E_NOINTERFACE; } - return IUnknown_QueryInterface((IUnknown *)&(This->IUnknown_inner), riid, ppv); + return IUnknown_QueryInterface(&This->IUnknown_inner, riid, ppv); } static ULONG SeekOuter_AddRef(PassThruImpl *This) { if (This->outer_unk && This->bUnkOuterValid) return IUnknown_AddRef(This->outer_unk); - return IUnknown_AddRef((IUnknown *)&(This->IUnknown_inner)); + return IUnknown_AddRef(&This->IUnknown_inner); } static ULONG SeekOuter_Release(PassThruImpl *This) { if (This->outer_unk && This->bUnkOuterValid) return IUnknown_Release(This->outer_unk); - return IUnknown_Release((IUnknown *)&(This->IUnknown_inner)); + return IUnknown_Release(&This->IUnknown_inner); } static HRESULT WINAPI SeekingPassThru_QueryInterface(ISeekingPassThru *iface, REFIID riid, LPVOID *ppvObj) diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index fa2545be6dc..366e6d61167 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -238,7 +238,8 @@ static const BaseInputPinFuncTable input_BaseInputFuncTable = { }; -HRESULT WINAPI BaseRenderer_Init(BaseRenderer * This, const IBaseFilterVtbl *Vtbl, IUnknown *pUnkOuter, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseRendererFuncTable* pBaseFuncsTable) +HRESULT WINAPI BaseRenderer_Init(BaseRenderer * This, const IBaseFilterVtbl *Vtbl, IUnknown *pUnkOuter, const CLSID *pClsid, + DWORD_PTR DebugInfo, const BaseRendererFuncTable* pBaseFuncsTable) { PIN_INFO piInput; HRESULT hr; @@ -257,7 +258,8 @@ HRESULT WINAPI BaseRenderer_Init(BaseRenderer * This, const IBaseFilterVtbl *Vtb if (SUCCEEDED(hr)) { - hr = CreatePosPassThru(pUnkOuter ? pUnkOuter: (IUnknown*)This, TRUE, &This->pInputPin->pin.IPin_iface, &This->pPosition); + hr = CreatePosPassThru(pUnkOuter ? pUnkOuter: (IUnknown *)&This->filter.IBaseFilter_iface, TRUE, + &This->pInputPin->pin.IPin_iface, &This->pPosition); if (FAILED(hr)) return hr; diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 65b6052c7c1..accb4f1702d 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -241,7 +241,8 @@ static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID* p { ISeekingPassThru *passthru; pTransformFilter->seekthru_unk = NULL; - hr = CoCreateInstance(&CLSID_SeekingPassThru, (IUnknown*)pTransformFilter, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&pTransformFilter->seekthru_unk); + hr = CoCreateInstance(&CLSID_SeekingPassThru, (IUnknown *)&pTransformFilter->filter.IBaseFilter_iface, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void **)&pTransformFilter->seekthru_unk); if (SUCCEEDED(hr)) { IUnknown_QueryInterface(pTransformFilter->seekthru_unk, &IID_ISeekingPassThru, (void**)&passthru);