Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/mixer.c | 4 +++- dlls/evr/tests/evr.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c index 70199f37a1c..710e20815ab 100644 --- a/dlls/evr/mixer.c +++ b/dlls/evr/mixer.c @@ -533,7 +533,9 @@ static HRESULT WINAPI video_mixer_transform_GetOutputAvailableType(IMFTransform
EnterCriticalSection(&mixer->cs);
- if (index >= mixer->output.type_count) + if (!mixer->inputs[0].media_type) + hr = MF_E_TRANSFORM_TYPE_NOT_SET; + else if (index >= mixer->output.type_count) hr = MF_E_NO_MORE_TYPES; else { diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index ecf1f850c77..a68952c42a0 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -835,6 +835,9 @@ static void test_default_mixer_type_negotiation(void) hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type); ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + hr = MFCreateMediaType(&media_type); ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr);