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:
parent
020d2202ea
commit
56bb596711
|
@ -613,10 +613,12 @@ static HRESULT WINAPI src_reader_GetNativeMediaType(IMFSourceReader *iface, DWOR
|
||||||
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, type_index, &src_type);
|
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, type_index, &src_type);
|
||||||
IMFMediaTypeHandler_Release(handler);
|
IMFMediaTypeHandler_Release(handler);
|
||||||
|
|
||||||
if (SUCCEEDED(hr = MFCreateMediaType(type)))
|
if (SUCCEEDED(hr))
|
||||||
hr = IMFMediaType_CopyAllItems(src_type, (IMFAttributes *)*type);
|
{
|
||||||
|
if (SUCCEEDED(hr = MFCreateMediaType(type)))
|
||||||
IMFMediaType_Release(src_type);
|
hr = IMFMediaType_CopyAllItems(src_type, (IMFAttributes *)*type);
|
||||||
|
IMFMediaType_Release(src_type);
|
||||||
|
}
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue