From: Brendan McGrath <bmcgrath@codeweavers.com> On Windows, when the ddraw media stream receives a ReceiveConnection request and the media type has a positive height value (i.e. a bottom-up image), it will call AcceptQuery on the peers Pin with the sign of the height flipped (i.e. it checks if the peer can produce a top-down image). It will reject the ReceiveConnection attempt with VFW_E_TYPE_NOT_ACCEPTED if the AcceptQuery returns S_FALSE. --- dlls/amstream/tests/amstream.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 8da987a6367..35f4b72cbe3 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -4083,11 +4083,29 @@ static void test_ddrawstream_receive_connection(void) hr = IDirectDrawMediaStream_SetFormat(ddraw_stream, &format, NULL); ok(hr == S_OK, "Got hr %#lx.\n", hr); + /* Return S_FALSE from QueryAccept */ + source.query_accept_hr = S_FALSE; hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &rgb32_mt); ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_Disconnect(pin); ok(hr == S_OK, "Got hr %#lx.\n", hr); + CopyMediaType(&mt, &rgb32_mt); + ((VIDEOINFO*)mt.pbFormat)->bmiHeader.biHeight = -rgb32_video_info.bmiHeader.biHeight; + hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); + todo_wine + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); + hr = IPin_Disconnect(pin); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + /* Return S_OK from QueryAccept */ + source.query_accept_hr = S_OK; + hr = IPin_ReceiveConnection(pin, &source.source.pin.IPin_iface, &mt); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IPin_Disconnect(pin); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + FreeMediaType(&mt); + format = rgb8_format; format.dwFlags = DDSD_HEIGHT; format.dwWidth = 333; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10595