evr/mixer: Handle uninitialized input case in GetOutputAvailableType().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
19342f43bb
commit
deac29d411
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue