Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
Sending tests first instead, as the review that more tests may be useful. It's not all completely related to H264, but I'm thinking that using the ColorConvertDMO transform instead of a videoconvert element might be best to correctly support H264 transform format changes, although none of the games I've tried are doing that.
dlls/mf/tests/mf.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 31a84e47bc1..b2dd807dd33 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -6631,6 +6631,7 @@ static void test_h264_decoder(void) IMFMediaType *media_type; IMFTransform *transform; DWORD status, length; + BOOL is_win7 = FALSE; ULONG i, ret, flags; HANDLE output_file; IMFSample *sample; @@ -6741,10 +6742,9 @@ static void test_h264_decoder(void) winetest_push_context("out %lu", i); ok(hr == S_OK, "GetOutputAvailableType returned %#lx\n", hr); check_media_type(media_type, default_outputs[i], -1); - if (FAILED(hr = IMFMediaType_GetItem(media_type, &MF_MT_VIDEO_ROTATION, NULL))) - check_media_type(media_type, default_outputs_win7[i], -1); - else - check_media_type(media_type, default_outputs_extra[i], -1); + hr = IMFMediaType_GetItem(media_type, &MF_MT_VIDEO_ROTATION, NULL); + is_win7 = broken(FAILED(hr)); + check_media_type(media_type, is_win7 ? default_outputs_win7[i] : default_outputs_extra[i], -1); ret = IMFMediaType_Release(media_type); ok(ret == 0, "Release returned %lu\n", ret); winetest_pop_context(); @@ -6772,11 +6772,9 @@ static void test_h264_decoder(void) init_media_type(media_type, output_type_desc, i + 1); } hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); - if (broken(hr == MF_E_INVALIDMEDIATYPE)) - { - init_media_type(media_type, output_type_desc_win7, ARRAY_SIZE(output_type_desc_win7) - 1); - hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); - } + ok(hr == (is_win7 ? MF_E_INVALIDMEDIATYPE : S_OK), "SetOutputType 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); ok(hr == S_OK, "SetOutputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); ok(ret == 1, "Release returned %lu\n", ret);