Zebediah Figura : strmbase: Don't check the subtype when determining if a media type is partial.
Alexandre Julliard
julliard at winehq.org
Mon Feb 17 15:42:14 CST 2020
Module: wine
Branch: master
Commit: 7c35fccbcc8f961a19b1910f5a0d6cbdc534ceee
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7c35fccbcc8f961a19b1910f5a0d6cbdc534ceee
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Sun Feb 16 23:31:50 2020 -0600
strmbase: Don't check the subtype when determining if a media type is partial.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 240938fdc0..002966d276 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 ff86dd5acc..c8b368e4b6 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 19485abb5c..844619b8fd 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);
More information about the wine-cvs
mailing list