strmbase: Don't check the subtype when determining if a media type is partial.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-02-16 23:31:50 -06:00 committed by Alexandre Julliard
parent 4f1df5246c
commit 7c35fccbcc
3 changed files with 5 additions and 13 deletions

View file

@ -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. */

View file

@ -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. */

View file

@ -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);