Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfreadwrite/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/mfreadwrite/main.c b/dlls/mfreadwrite/main.c index 8145e5b0ed..e27fe82216 100644 --- a/dlls/mfreadwrite/main.c +++ b/dlls/mfreadwrite/main.c @@ -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; }