[PATCH 5/6] strmbase: Don't check the subtype when determining if a media type is partial.

Zebediah Figura z.figura12 at gmail.com
Tue Feb 11 21:08:32 CST 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/quartz/tests/avisplit.c  | 7 +------
 dlls/quartz/tests/mpegsplit.c | 7 +------
 dlls/strmbase/pin.c           | 4 +++-
 3 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/dlls/quartz/tests/avisplit.c b/dlls/quartz/tests/avisplit.c
index 240938fdc04..002966d276c 100644
--- a/dlls/quartz/tests/avisplit.c
+++ b/dlls/quartz/tests/avisplit.c
@@ -1200,12 +1200,7 @@ static void test_connect_pin(void)
     ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
     req_mt.subtype = GUID_NULL;
     hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt);
-    todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
-    if (hr == S_OK)
-    {
-        IFilterGraph2_Disconnect(graph, source);
-        IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
-    }
+    ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
     req_mt.subtype = MEDIASUBTYPE_I420;
 
     /* Connection with wildcards. */
diff --git a/dlls/quartz/tests/mpegsplit.c b/dlls/quartz/tests/mpegsplit.c
index ff86dd5acc3..c8b368e4b68 100644
--- a/dlls/quartz/tests/mpegsplit.c
+++ b/dlls/quartz/tests/mpegsplit.c
@@ -1435,12 +1435,7 @@ static void test_connect_pin(void)
     ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
     req_mt.subtype = GUID_NULL;
     hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt);
-    todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
-    if (hr == S_OK)
-    {
-        IFilterGraph2_Disconnect(graph, source);
-        IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
-    }
+    ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
     req_mt.subtype = MEDIASUBTYPE_MPEG1AudioPayload;
 
     /* Connection with wildcards. */
diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c
index 19485abb5c5..844619b8fd9 100644
--- a/dlls/strmbase/pin.c
+++ b/dlls/strmbase/pin.c
@@ -482,8 +482,10 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP
         return VFW_E_NOT_STOPPED;
     }
 
+    /* We don't check the subtype here. The rationale (as given by the DirectX
+     * documentation) is that the format type is supposed to provide at least
+     * as much information as the subtype. */
     if (mt && !IsEqualGUID(&mt->majortype, &GUID_NULL)
-            && !IsEqualGUID(&mt->subtype, &GUID_NULL)
             && !IsEqualGUID(&mt->formattype, &GUID_NULL))
     {
         hr = pin->pFuncsTable->pfnAttemptConnection(pin, peer, mt);
-- 
2.25.0




More information about the wine-devel mailing list