[PATCH 1/5] quartz/tests: Bail out if connecting returns E_FAIL.

Zebediah Figura z.figura12 at gmail.com
Wed Oct 9 22:33:40 CDT 2019


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47911
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/quartz/tests/vmr9.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c
index 928484ccb6a..fa63b5b85cc 100644
--- a/dlls/quartz/tests/vmr9.c
+++ b/dlls/quartz/tests/vmr9.c
@@ -941,7 +941,7 @@ static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface
 
     if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt)))
     {
-        ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
+        ok(hr == VFW_E_TYPE_NOT_ACCEPTED || hr == E_FAIL, "Got hr %#x.\n", hr);
         IPin_Release(peer);
         iface->pin.peer = NULL;
         FreeMediaType(&iface->pin.mtCurrent);
@@ -1016,6 +1016,11 @@ static void test_connect_pin(void)
             vih.bmiHeader.biBitCount = bpp_tests[j];
 
             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 for subtype %s and bpp %u.\n", hr,
                     wine_dbgstr_guid(subtype_tests[i]), bpp_tests[j]);
 
@@ -1087,6 +1092,7 @@ static void test_connect_pin(void)
     hr = IPin_ConnectionMediaType(pin, &mt);
     ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr);
 
+out:
     IPin_Release(pin);
     ref = IFilterGraph2_Release(graph);
     ok(!ref, "Got outstanding refcount %d.\n", ref);
-- 
2.23.0




More information about the wine-devel mailing list