strmbase: Return the iface instead of the object pointer.
This commit is contained in:
parent
8bd2eb3e78
commit
974e5af3fe
|
@ -36,23 +36,15 @@ static inline BaseFilter *impl_from_IBaseFilter(IBaseFilter *iface)
|
||||||
|
|
||||||
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv)
|
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv)
|
||||||
{
|
{
|
||||||
BaseFilter *This = impl_from_IBaseFilter(iface);
|
|
||||||
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
|
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
|
|
||||||
if (IsEqualIID(riid, &IID_IUnknown))
|
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPersist) ||
|
||||||
*ppv = This;
|
IsEqualIID(riid, &IID_IMediaFilter) || IsEqualIID(riid, &IID_IBaseFilter))
|
||||||
else if (IsEqualIID(riid, &IID_IPersist))
|
|
||||||
*ppv = This;
|
|
||||||
else if (IsEqualIID(riid, &IID_IMediaFilter))
|
|
||||||
*ppv = This;
|
|
||||||
else if (IsEqualIID(riid, &IID_IBaseFilter))
|
|
||||||
*ppv = This;
|
|
||||||
|
|
||||||
if (*ppv)
|
|
||||||
{
|
{
|
||||||
IUnknown_AddRef((IUnknown *)(*ppv));
|
*ppv = iface;
|
||||||
|
IBaseFilter_AddRef(iface);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue