Commit 5fb58eae authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

quartz: Minor cleanup of returned interface pointers.

parent a3e4c694
...@@ -1451,7 +1451,7 @@ HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv) ...@@ -1451,7 +1451,7 @@ HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
if (FAILED(hr)) if (FAILED(hr))
return hr; return hr;
*ppv = This; *ppv = &This->Parser.filter.IBaseFilter_iface;
return hr; return hr;
} }
...@@ -810,20 +810,18 @@ static HRESULT WINAPI FileAsyncReaderPin_QueryInterface(IPin * iface, REFIID rii ...@@ -810,20 +810,18 @@ static HRESULT WINAPI FileAsyncReaderPin_QueryInterface(IPin * iface, REFIID rii
*ppv = NULL; *ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown)) if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPin))
*ppv = This; *ppv = &This->pin.pin.IPin_iface;
else if (IsEqualIID(riid, &IID_IPin))
*ppv = This;
else if (IsEqualIID(riid, &IID_IAsyncReader)) else if (IsEqualIID(riid, &IID_IAsyncReader))
*ppv = &This->IAsyncReader_iface; *ppv = &This->IAsyncReader_iface;
if (*ppv) if (*ppv)
{ {
IUnknown_AddRef((IUnknown *)(*ppv)); IUnknown_AddRef((IUnknown *)*ppv);
return S_OK; 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)); FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
return E_NOINTERFACE; return E_NOINTERFACE;
......
...@@ -797,7 +797,7 @@ HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv) ...@@ -797,7 +797,7 @@ HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
This->seek = TRUE; This->seek = TRUE;
/* Note: This memory is managed by the parser filter once created */ /* Note: This memory is managed by the parser filter once created */
*ppv = This; *ppv = &This->Parser.filter.IBaseFilter_iface;
return hr; return hr;
} }
...@@ -147,11 +147,11 @@ HRESULT WINAPI Parser_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ...@@ -147,11 +147,11 @@ HRESULT WINAPI Parser_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID *
|| IsEqualIID(riid, &IID_IPersist) || IsEqualIID(riid, &IID_IPersist)
|| IsEqualIID(riid, &IID_IMediaFilter) || IsEqualIID(riid, &IID_IMediaFilter)
|| IsEqualIID(riid, &IID_IBaseFilter) ) || IsEqualIID(riid, &IID_IBaseFilter) )
*ppv = This; *ppv = &This->filter.IBaseFilter_iface;
if (*ppv) if (*ppv)
{ {
IUnknown_AddRef((IUnknown *)(*ppv)); IUnknown_AddRef((IUnknown *)*ppv);
return S_OK; return S_OK;
} }
...@@ -521,21 +521,21 @@ static HRESULT WINAPI Parser_Seeking_QueryInterface(IMediaSeeking * iface, REFII ...@@ -521,21 +521,21 @@ static HRESULT WINAPI Parser_Seeking_QueryInterface(IMediaSeeking * iface, REFII
{ {
ParserImpl *This = impl_from_IMediaSeeking(iface); 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) static ULONG WINAPI Parser_Seeking_AddRef(IMediaSeeking * iface)
{ {
ParserImpl *This = impl_from_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) static ULONG WINAPI Parser_Seeking_Release(IMediaSeeking * iface)
{ {
ParserImpl *This = impl_from_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 = static const IMediaSeekingVtbl Parser_Seeking_Vtbl =
......
...@@ -215,7 +215,7 @@ static HRESULT WINAPI SystemClockImpl_QueryInterface(IReferenceClock* iface, REF ...@@ -215,7 +215,7 @@ static HRESULT WINAPI SystemClockImpl_QueryInterface(IReferenceClock* iface, REF
if (IsEqualIID (riid, &IID_IUnknown) || if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IReferenceClock)) { IsEqualIID (riid, &IID_IReferenceClock)) {
SystemClockImpl_AddRef(iface); SystemClockImpl_AddRef(iface);
*ppobj = This; *ppobj = &This->IReferenceClock_iface;
return S_OK; return S_OK;
} }
......
...@@ -3111,6 +3111,6 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *paren ...@@ -3111,6 +3111,6 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(struct quartz_vmr *paren
This->SurfaceAllocatorNotify = NULL; This->SurfaceAllocatorNotify = NULL;
This->reset = FALSE; This->reset = FALSE;
*ppv = This; *ppv = &This->IVMRImagePresenter9_iface;
return S_OK; return S_OK;
} }
...@@ -440,7 +440,7 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv) ...@@ -440,7 +440,7 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)
if (FAILED(hr)) if (FAILED(hr))
return hr; return hr;
*ppv = This; *ppv = &This->Parser.filter.IBaseFilter_iface;
return hr; return hr;
} }
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