Commit 56bb5967 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfreadwrite: Handle failure path in GetNativeMediaType().

parent 020d2202
......@@ -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 = MFCreateMediaType(type)))
hr = IMFMediaType_CopyAllItems(src_type, (IMFAttributes *)*type);
IMFMediaType_Release(src_type);
if (SUCCEEDED(hr))
{
if (SUCCEEDED(hr = MFCreateMediaType(type)))
hr = IMFMediaType_CopyAllItems(src_type, (IMFAttributes *)*type);
IMFMediaType_Release(src_type);
}
return hr;
}
......
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