Commit 974e5af3 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

strmbase: Return the iface instead of the object pointer.

parent 8bd2eb3e
......@@ -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;
}
......
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