Commit 5d5da39d authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

amstream: Cleanup MediaStreamFilterImpl_QueryInterface.

parent 568c88cc
......@@ -102,29 +102,22 @@ static const BaseInputPinFuncTable input_BaseInputFuncTable = {
/*** IUnknown methods ***/
static HRESULT WINAPI MediaStreamFilterImpl_QueryInterface(IMediaStreamFilter *iface, REFIID riid,
void **ppv)
static HRESULT WINAPI MediaStreamFilterImpl_QueryInterface(IMediaStreamFilter *iface, REFIID riid, void **ret_iface)
{
IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface);
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface);
*ppv = NULL;
*ret_iface = 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;
else if (IsEqualIID(riid, &IID_IMediaStreamFilter))
*ppv = This;
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IPersist) ||
IsEqualIID(riid, &IID_IMediaFilter) ||
IsEqualIID(riid, &IID_IBaseFilter) ||
IsEqualIID(riid, &IID_IMediaStreamFilter))
*ret_iface = iface;
if (*ppv)
if (*ret_iface)
{
IUnknown_AddRef((IUnknown *)(*ppv));
IMediaStreamFilter_AddRef(*ret_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