Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/mixer.c | 6 +++++- dlls/evr/tests/evr.c | 1 - 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c index 710e20815ab..e19520fa7ed 100644 --- a/dlls/evr/mixer.c +++ b/dlls/evr/mixer.c @@ -604,6 +604,7 @@ static HRESULT video_mixer_collect_output_types(struct video_mixer *mixer, const if (!(ptr = heap_realloc(rt_formats, (count + format_count) * sizeof(*rt_formats)))) { hr = E_OUTOFMEMORY; + count = 0; CoTaskMemFree(formats); break; } @@ -641,12 +642,15 @@ static HRESULT video_mixer_collect_output_types(struct video_mixer *mixer, const mixer->output.type_count = count; } else + { hr = E_OUTOFMEMORY; + count = 0; + } }
heap_free(rt_formats);
- return hr; + return count ? S_OK : hr; }
static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *media_type, DWORD flags) diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index 3e2675497a1..bf33051d6e1 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -893,7 +893,6 @@ static void test_default_mixer_type_negotiation(void) ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, (IMFMediaType *)video_type, 0); -todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);