mfreadwrite: Handle failure path in GetNativeMediaType().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-04-22 10:52:28 +03:00 committed by Alexandre Julliard
parent 020d2202ea
commit 56bb596711
1 changed files with 6 additions and 4 deletions

View File

@ -613,10 +613,12 @@ static HRESULT WINAPI src_reader_GetNativeMediaType(IMFSourceReader *iface, DWOR
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, type_index, &src_type);
IMFMediaTypeHandler_Release(handler);
if (SUCCEEDED(hr))
{
if (SUCCEEDED(hr = MFCreateMediaType(type)))
hr = IMFMediaType_CopyAllItems(src_type, (IMFAttributes *)*type);
IMFMediaType_Release(src_type);
}
return hr;
}