strmbase: Return the iface instead of the object pointer.

This commit is contained in:
Michael Stefaniuc 2014-02-20 00:10:51 +01:00 committed by Alexandre Julliard
parent 8bd2eb3e78
commit 974e5af3fe

View file

@ -36,23 +36,15 @@ static inline BaseFilter *impl_from_IBaseFilter(IBaseFilter *iface)
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);
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown))
*ppv = This;
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)
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPersist) ||
IsEqualIID(riid, &IID_IMediaFilter) || IsEqualIID(riid, &IID_IBaseFilter))
{
IUnknown_AddRef((IUnknown *)(*ppv));
*ppv = iface;
IBaseFilter_AddRef(iface);
return S_OK;
}