Nikolay Sivov : mfplat/tests: Fix test crash on old Windows 10 systems.

Alexandre Julliard julliard at winehq.org
Tue Dec 14 15:34:31 CST 2021


Module: wine
Branch: master
Commit: 77f596659682859487032cd5d145277c0944e1a1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=77f596659682859487032cd5d145277c0944e1a1

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Dec 14 11:10:21 2021 +0300

mfplat/tests: Fix test crash on old Windows 10 systems.

MFCreateDXGISurfaceBuffer() rejects unsupported riid argument.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52166
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mfplat/tests/mfplat.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
index 06547dba3f4..33b93852e2a 100644
--- a/dlls/mfplat/tests/mfplat.c
+++ b/dlls/mfplat/tests/mfplat.c
@@ -6867,7 +6867,12 @@ static void test_d3d12_surface_buffer(void)
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
 
     hr = pMFCreateDXGISurfaceBuffer(&IID_ID3D12Resource, (IUnknown *)resource, 0, FALSE, &buffer);
+    if (hr == E_INVALIDARG)
+    {
 todo_wine
+        win_skip("D3D12 resource buffers are not supported.\n");
+        goto notsupported;
+    }
     ok(hr == S_OK, "Failed to create a buffer, hr %#x.\n", hr);
 
 if (SUCCEEDED(hr))
@@ -6888,6 +6893,8 @@ if (SUCCEEDED(hr))
     IMFDXGIBuffer_Release(dxgi_buffer);
     IMFMediaBuffer_Release(buffer);
 }
+
+notsupported:
     ID3D12Resource_Release(resource);
     refcount = ID3D12Device_Release(device);
     ok(!refcount, "Unexpected device refcount %u.\n", refcount);




More information about the wine-cvs mailing list