[PATCH] quartz/tests: Skip the IVideoWindow tests if connecting returns E_FAIL.

Zebediah Figura z.figura12 at gmail.com
Fri Dec 27 11:50:33 CST 2019


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/quartz/tests/vmr9.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c
index 3024fa84ef..d3d8893cb5 100644
--- a/dlls/quartz/tests/vmr9.c
+++ b/dlls/quartz/tests/vmr9.c
@@ -2267,7 +2267,13 @@ static void test_video_window(void)
     testfilter_init(&source);
     IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
     IFilterGraph2_AddFilter(graph, filter, NULL);
+    IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
     hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt);
+    if (hr == E_FAIL)
+    {
+        skip("Got E_FAIL when connecting.\n");
+        goto out;
+    }
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
     hr = IMemInputPin_GetAllocator(input, &allocator);
@@ -2302,8 +2308,6 @@ static void test_video_window(void)
     hr = IVideoWindow_GetMaxIdealImageSize(window, &width, &height);
     todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr);
 
-    IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
-
     hr = IMediaControl_Pause(control);
     ok(hr == S_FALSE, "Got hr %#x.\n", hr);
 
@@ -2324,6 +2328,7 @@ static void test_video_window(void)
     hr = IMediaControl_Stop(control);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
+out:
     IMediaControl_Release(control);
     IFilterGraph2_Release(graph);
     IVideoWindow_Release(window);
-- 
2.24.1




More information about the wine-devel mailing list