From ab1203999211209da4e737d9fc71581bea9a6bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 28 Apr 2022 12:24:36 +0200 Subject: [PATCH] mf/tests: Skip todo_wine tests with a goto statement. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: RĂ©mi Bernon Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/mf/tests/mf.c | 48 ++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 37520d48292..6f6213b1e26 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -6999,33 +6999,31 @@ static void test_h264_decoder(void) ok(output.dwStatus == 0, "got dwStatus %#lx\n", output.dwStatus); ok(!output.pEvents, "got pEvents %p\n", output.pEvents); ok(status == 0, "got status %#lx\n", status); - if (hr == S_OK) - { - /* Win8 and before pad the data with garbage instead of original - * buffer data, make sure it's consistent. */ - hr = IMFSample_ConvertToContiguousBuffer(output.pSample, &media_buffer); - ok(hr == S_OK, "ConvertToContiguousBuffer returned %#lx\n", hr); - hr = IMFMediaBuffer_Lock(media_buffer, &data, NULL, &length); - ok(hr == S_OK, "Lock returned %#lx\n", hr); - todo_wine - ok(length == nv12_frame_len, "got length %lu\n", length); - if (length == nv12_frame_len) - { - for (i = 0; i < actual_aperture.Area.cy; ++i) - { - memset(data + actual_width * i + actual_aperture.Area.cx, 0xcd, actual_width - actual_aperture.Area.cx); - memset(data + actual_width * (actual_height + i) + actual_aperture.Area.cx, 0xcd, actual_width - actual_aperture.Area.cx); - } - memset(data + actual_width * actual_aperture.Area.cy, 0xcd, (actual_height - actual_aperture.Area.cy) * actual_width); - memset(data + actual_width * (actual_height + actual_aperture.Area.cy / 2), 0xcd, (actual_height - actual_aperture.Area.cy) / 2 * actual_width); - } - hr = IMFMediaBuffer_Unlock(media_buffer); - ok(hr == S_OK, "Unlock returned %#lx\n", hr); - IMFMediaBuffer_Release(media_buffer); + if (hr != S_OK) goto skip_nv12_tests; - if (length == nv12_frame_len) - check_sample(output.pSample, nv12_frame_data, output_file); + /* Win8 and before pad the data with garbage instead of original + * buffer data, make sure it's consistent. */ + hr = IMFSample_ConvertToContiguousBuffer(output.pSample, &media_buffer); + ok(hr == S_OK, "ConvertToContiguousBuffer returned %#lx\n", hr); + hr = IMFMediaBuffer_Lock(media_buffer, &data, NULL, &length); + ok(hr == S_OK, "Lock returned %#lx\n", hr); + ok(length == nv12_frame_len, "got length %lu\n", length); + + for (i = 0; i < actual_aperture.Area.cy; ++i) + { + memset(data + actual_width * i + actual_aperture.Area.cx, 0xcd, actual_width - actual_aperture.Area.cx); + memset(data + actual_width * (actual_height + i) + actual_aperture.Area.cx, 0xcd, actual_width - actual_aperture.Area.cx); } + memset(data + actual_width * actual_aperture.Area.cy, 0xcd, (actual_height - actual_aperture.Area.cy) * actual_width); + memset(data + actual_width * (actual_height + actual_aperture.Area.cy / 2), 0xcd, (actual_height - actual_aperture.Area.cy) / 2 * actual_width); + + hr = IMFMediaBuffer_Unlock(media_buffer); + ok(hr == S_OK, "Unlock returned %#lx\n", hr); + IMFMediaBuffer_Release(media_buffer); + + check_sample(output.pSample, nv12_frame_data, output_file); + +skip_nv12_tests: ret = IMFSample_Release(output.pSample); ok(ret == 0, "Release returned %lu\n", ret);