Commit 7a8254fd authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard
parent 9c711ba7
......@@ -7311,7 +7311,6 @@ static void test_h264_decoder(void)
ok(hr == S_OK, "MFCreateMediaType returned %#lx\n", hr);
init_media_type(media_type, is_win7 ? output_type_desc_win7 : output_type_desc, -1);
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0);
todo_wine
ok(hr == MF_E_INVALIDMEDIATYPE, "SetOutputType returned %#lx.\n", hr);
init_media_type(media_type, is_win7 ? new_output_type_desc_win7 : new_output_type_desc, -1);
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0);
......
......@@ -433,6 +433,7 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
{
struct h264_decoder *decoder = impl_from_IMFTransform(iface);
GUID major, subtype;
UINT64 frame_size;
HRESULT hr;
ULONG i;
......@@ -454,6 +455,11 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
if (i == ARRAY_SIZE(h264_decoder_output_types))
return MF_E_INVALIDMEDIATYPE;
if (FAILED(hr = IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &frame_size))
|| (frame_size >> 32) != decoder->wg_format.u.video.width
|| (UINT32)frame_size != decoder->wg_format.u.video.height)
return MF_E_INVALIDMEDIATYPE;
if (decoder->output_type)
IMFMediaType_Release(decoder->output_type);
IMFMediaType_AddRef((decoder->output_type = type));
......
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