quartz: Check whether the pin is connected in IVideoWindow::put_AutoShow().

Ferro CCTV calls this.
This commit is contained in:
Zebediah Figura 2023-05-03 13:05:05 -05:00 committed by Alexandre Julliard
parent 9b47d3c543
commit 233f86abf4
4 changed files with 15 additions and 3 deletions

View file

@ -2393,6 +2393,9 @@ static void test_video_window(void)
hr = IVideoWindow_get_AutoShow(window, &l);
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_AutoShow(window, OAFALSE);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source);
IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
IFilterGraph2_AddFilter(graph, filter, NULL);

View file

@ -2392,6 +2392,9 @@ static void test_video_window(void)
hr = IVideoWindow_get_AutoShow(window, &l);
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_AutoShow(window, OAFALSE);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source);
IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
IFilterGraph2_AddFilter(graph, filter, NULL);

View file

@ -2618,6 +2618,9 @@ static void test_video_window(void)
hr = IVideoWindow_get_AutoShow(window, &l);
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_AutoShow(window, OAFALSE);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source);
IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
IFilterGraph2_AddFilter(graph, filter, NULL);

View file

@ -273,11 +273,14 @@ HRESULT WINAPI BaseControlWindowImpl_get_WindowStyleEx(IVideoWindow *iface, LONG
HRESULT WINAPI BaseControlWindowImpl_put_AutoShow(IVideoWindow *iface, LONG AutoShow)
{
struct video_window *This = impl_from_IVideoWindow(iface);
struct video_window *window = impl_from_IVideoWindow(iface);
TRACE("window %p, AutoShow %ld.\n", This, AutoShow);
TRACE("window %p, AutoShow %ld.\n", window, AutoShow);
This->AutoShow = AutoShow;
if (!window->pPin->peer)
return VFW_E_NOT_CONNECTED;
window->AutoShow = AutoShow;
return S_OK;
}