Commit 44c91bcb authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Always return VFW_E_TYPE_NOT_ACCEPTED if the pin_query_accept() callback fails.

parent 32712b4b
...@@ -1191,12 +1191,12 @@ static void test_connect_pin(void) ...@@ -1191,12 +1191,12 @@ static void test_connect_pin(void)
req_mt.majortype = MEDIATYPE_Stream; req_mt.majortype = MEDIATYPE_Stream;
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); 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); ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
req_mt.majortype = MEDIATYPE_Video; req_mt.majortype = MEDIATYPE_Video;
req_mt.subtype = MEDIASUBTYPE_RGB32; req_mt.subtype = MEDIASUBTYPE_RGB32;
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); 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); ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
req_mt.subtype = GUID_NULL; req_mt.subtype = GUID_NULL;
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); 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); todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
......
...@@ -1426,12 +1426,12 @@ static void test_connect_pin(void) ...@@ -1426,12 +1426,12 @@ static void test_connect_pin(void)
req_mt.majortype = MEDIATYPE_Stream; req_mt.majortype = MEDIATYPE_Stream;
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); 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); ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
req_mt.majortype = MEDIATYPE_Audio; req_mt.majortype = MEDIATYPE_Audio;
req_mt.subtype = MEDIASUBTYPE_PCM; req_mt.subtype = MEDIASUBTYPE_PCM;
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); 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); ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
req_mt.subtype = GUID_NULL; req_mt.subtype = GUID_NULL;
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); 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); todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr);
......
...@@ -735,8 +735,8 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This, ...@@ -735,8 +735,8 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt); TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt);
if ((hr = This->pFuncsTable->base.pin_query_accept(&This->pin, pmt)) != S_OK) if (This->pFuncsTable->base.pin_query_accept(&This->pin, pmt) != S_OK)
return hr; return VFW_E_TYPE_NOT_ACCEPTED;
This->pin.peer = pReceivePin; This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin); IPin_AddRef(pReceivePin);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment