strmbase: Remove some of casts to interface pointers.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-11-25 12:10:47 +03:00 committed by Alexandre Julliard
parent 61105aee5b
commit 875b8a6d4a
4 changed files with 13 additions and 10 deletions

View File

@ -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;
}

View File

@ -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)

View File

@ -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;

View File

@ -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);