mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
strmbase: Return the iface instead of the object pointer.
This commit is contained in:
parent
8bd2eb3e78
commit
974e5af3fe
1 changed files with 4 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue