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

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Zebediah Figura 2020-02-06 16:49:10 -06:00 committed by Alexandre Julliard
parent 32712b4bd7
commit 44c91bcbb0
3 changed files with 6 additions and 6 deletions

View File

@ -1191,12 +1191,12 @@ static void test_connect_pin(void)
req_mt.majortype = MEDIATYPE_Stream;
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.subtype = MEDIASUBTYPE_RGB32;
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;
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);

View File

@ -1426,12 +1426,12 @@ static void test_connect_pin(void)
req_mt.majortype = MEDIATYPE_Stream;
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.subtype = MEDIASUBTYPE_PCM;
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;
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);

View File

@ -735,8 +735,8 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt);
if ((hr = This->pFuncsTable->base.pin_query_accept(&This->pin, pmt)) != S_OK)
return hr;
if (This->pFuncsTable->base.pin_query_accept(&This->pin, pmt) != S_OK)
return VFW_E_TYPE_NOT_ACCEPTED;
This->pin.peer = pReceivePin;
IPin_AddRef(pReceivePin);