Commit deac29d4 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

evr/mixer: Handle uninitialized input case in GetOutputAvailableType().

parent 19342f43
......@@ -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
{
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment