Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfreadwrite/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/mfreadwrite/main.c b/dlls/mfreadwrite/main.c index fd9062f648..7625669ddb 100644 --- a/dlls/mfreadwrite/main.c +++ b/dlls/mfreadwrite/main.c @@ -727,7 +727,13 @@ static DWORD reader_get_first_stream_index(IMFPresentationDescriptor *descriptor { hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); IMFMediaTypeHandler_Release(handler); - if (SUCCEEDED(hr) && IsEqualGUID(&guid, major)) + if (FAILED(hr)) + { + WARN("Failed to get stream major type, hr %#x.\n", hr); + continue; + } + + if (IsEqualGUID(&guid, major)) { return i; }