quartz: Minor cleanup of returned 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 2015-10-21 14:31:49 +03:00 committed by Alexandre Julliard
parent a3e4c69419
commit 5fb58eae3b
7 changed files with 14 additions and 16 deletions

View File

@ -1451,7 +1451,7 @@ HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
if (FAILED(hr))
return hr;
*ppv = This;
*ppv = &This->Parser.filter.IBaseFilter_iface;
return hr;
}

View File

@ -810,20 +810,18 @@ static HRESULT WINAPI FileAsyncReaderPin_QueryInterface(IPin * iface, REFIID rii
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown))
*ppv = This;
else if (IsEqualIID(riid, &IID_IPin))
*ppv = This;
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPin))
*ppv = &This->pin.pin.IPin_iface;
else if (IsEqualIID(riid, &IID_IAsyncReader))
*ppv = &This->IAsyncReader_iface;
if (*ppv)
{
IUnknown_AddRef((IUnknown *)(*ppv));
IUnknown_AddRef((IUnknown *)*ppv);
return S_OK;
}
if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IMediaSeeking))
if (!IsEqualIID(riid, &IID_IMediaSeeking))
FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
return E_NOINTERFACE;

View File

@ -797,7 +797,7 @@ HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
This->seek = TRUE;
/* Note: This memory is managed by the parser filter once created */
*ppv = This;
*ppv = &This->Parser.filter.IBaseFilter_iface;
return hr;
}

View File

@ -147,11 +147,11 @@ HRESULT WINAPI Parser_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID *
|| IsEqualIID(riid, &IID_IPersist)
|| IsEqualIID(riid, &IID_IMediaFilter)
|| IsEqualIID(riid, &IID_IBaseFilter) )
*ppv = This;
*ppv = &This->filter.IBaseFilter_iface;
if (*ppv)
{
IUnknown_AddRef((IUnknown *)(*ppv));
IUnknown_AddRef((IUnknown *)*ppv);
return S_OK;
}
@ -521,21 +521,21 @@ static HRESULT WINAPI Parser_Seeking_QueryInterface(IMediaSeeking * iface, REFII
{
ParserImpl *This = impl_from_IMediaSeeking(iface);
return IUnknown_QueryInterface((IUnknown *)This, riid, ppv);
return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv);
}
static ULONG WINAPI Parser_Seeking_AddRef(IMediaSeeking * iface)
{
ParserImpl *This = impl_from_IMediaSeeking(iface);
return IUnknown_AddRef((IUnknown *)This);
return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
}
static ULONG WINAPI Parser_Seeking_Release(IMediaSeeking * iface)
{
ParserImpl *This = impl_from_IMediaSeeking(iface);
return IUnknown_Release((IUnknown *)This);
return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
}
static const IMediaSeekingVtbl Parser_Seeking_Vtbl =

View File

@ -215,7 +215,7 @@ static HRESULT WINAPI SystemClockImpl_QueryInterface(IReferenceClock* iface, REF
if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IReferenceClock)) {
SystemClockImpl_AddRef(iface);
*ppobj = This;
*ppobj = &This->IReferenceClock_iface;
return S_OK;
}

View File

@ -3111,6 +3111,6 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *paren
This->SurfaceAllocatorNotify = NULL;
This->reset = FALSE;
*ppv = This;
*ppv = &This->IVMRImagePresenter9_iface;
return S_OK;
}

View File

@ -440,7 +440,7 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)
if (FAILED(hr))
return hr;
*ppv = This;
*ppv = &This->Parser.filter.IBaseFilter_iface;
return hr;
}