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);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/tests/evr.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index a68952c42a0..3e2675497a1 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -805,11 +805,11 @@ done:
static void test_default_mixer_type_negotiation(void) { + IMFMediaType *media_type, *media_type2; IDirect3DDeviceManager9 *manager; DXVA2_VideoProcessorCaps caps; IMFVideoMediaType *video_type; IMFVideoProcessor *processor; - IMFMediaType *media_type; IDirect3DDevice9 *device; IMFTransform *transform; GUID guid, *guids; @@ -896,6 +896,18 @@ static void test_default_mixer_type_negotiation(void) todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type); +todo_wine + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); +if (hr == S_OK) +{ + ok(media_type != (IMFMediaType *)video_type, "Unexpected media type instance.\n"); + hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type2); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(media_type == media_type2, "Unexpected media type instance.\n"); + IMFMediaType_Release(media_type); + IMFMediaType_Release(media_type2); +} hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoProcessor, (void **)&processor); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);