PowerPoint 2016 tries to build a graph by autoplugging the file source to the sample grabber; direct connection should fail here.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/quartz/filesource.c | 3 ++- dlls/quartz/tests/filesource.c | 30 +++++------------------------- 2 files changed, 7 insertions(+), 26 deletions(-)
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index c683283752b..8fed09cab0d 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -605,7 +605,8 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(struct strmbase_sourc
TRACE("%p->(%p, %p)\n", This, pReceivePin, pmt);
- /* FIXME: call queryacceptproc */ + if (This->pin.ops->pin_query_accept(&This->pin, pmt) != S_OK) + return VFW_E_TYPE_NOT_ACCEPTED;
This->pin.peer = pReceivePin; IPin_AddRef(pReceivePin); diff --git a/dlls/quartz/tests/filesource.c b/dlls/quartz/tests/filesource.c index 846b92ac60b..2040910516f 100644 --- a/dlls/quartz/tests/filesource.c +++ b/dlls/quartz/tests/filesource.c @@ -1363,12 +1363,7 @@ static void test_connect_pin(void)
req_mt.majortype = MEDIATYPE_Video; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.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.pin.pin.IPin_iface); - } + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); req_mt.majortype = MEDIATYPE_Stream;
req_mt.subtype = MEDIASUBTYPE_RGB8; @@ -1379,12 +1374,7 @@ static void test_connect_pin(void) IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface); req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.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.pin.pin.IPin_iface); - } + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); req_mt.subtype = MEDIASUBTYPE_Avi;
/* Test connection with wildcards. */ @@ -1445,12 +1435,7 @@ static void test_connect_pin(void) * consistent with its being rejected by IPin::QueryAccept(). */ testsink.reject_avi = TRUE; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, NULL); - todo_wine ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - IFilterGraph2_Disconnect(graph, source); - IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface); - } + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr);
/* But any types we expose are tried. */ testsink.mt = &mt; @@ -1459,17 +1444,12 @@ static void test_connect_pin(void) mt.subtype = MEDIASUBTYPE_RGB8; mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, NULL); - todo_wine ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - IFilterGraph2_Disconnect(graph, source); - IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface); - } + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr);
mt.majortype = MEDIATYPE_Stream; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(compare_media_types(&testsink.pin.pin.mt, &mt), "Media types didn't match.\n"); + ok(compare_media_types(&testsink.pin.pin.mt, &mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface);