mf: Set cancellation object directly (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-03-30 14:21:27 +03:00 committed by Alexandre Julliard
parent b2885d14d6
commit cb3517a1bf
1 changed files with 5 additions and 2 deletions

View File

@ -760,17 +760,20 @@ static HRESULT WINAPI file_scheme_handler_BeginCreateObject(IMFSchemeHandler *if
hr = MFCreateAsyncResult(&context->IUnknown_iface, &handler->IMFAsyncCallback_iface, (IUnknown *)caller, &item);
IUnknown_Release(&context->IUnknown_iface);
IMFAsyncResult_Release(caller);
if (SUCCEEDED(hr))
{
if (SUCCEEDED(hr = MFPutWorkItemEx(MFASYNC_CALLBACK_QUEUE_IO, item)))
{
if (cancel_cookie)
IMFAsyncResult_GetState(item, cancel_cookie);
{
*cancel_cookie = (IUnknown *)caller;
IUnknown_AddRef(*cancel_cookie);
}
}
IMFAsyncResult_Release(item);
}
IMFAsyncResult_Release(caller);
return hr;
}