Commit 875b8a6d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

strmbase: Remove some of casts to interface pointers.

parent 61105aee
......@@ -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;
}
......
......@@ -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)
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment