Commit e4ec04bf authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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

Ferro CCTV calls this.
parent 9d6f8a6a
......@@ -2399,6 +2399,9 @@ static void test_video_window(void)
hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_MessageDrain(window, (OAHWND)our_hwnd);
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);
......
......@@ -2398,6 +2398,9 @@ static void test_video_window(void)
hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_MessageDrain(window, (OAHWND)our_hwnd);
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);
......
......@@ -2624,6 +2624,9 @@ static void test_video_window(void)
hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_MessageDrain(window, (OAHWND)our_hwnd);
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);
......
......@@ -511,11 +511,14 @@ HRESULT WINAPI BaseControlWindowImpl_get_Owner(IVideoWindow *iface, OAHWND *Owne
HRESULT WINAPI BaseControlWindowImpl_put_MessageDrain(IVideoWindow *iface, OAHWND Drain)
{
struct video_window *This = impl_from_IVideoWindow(iface);
struct video_window *window = impl_from_IVideoWindow(iface);
TRACE("window %p, drain %#Ix.\n", window, Drain);
TRACE("window %p, drain %#Ix.\n", This, Drain);
if (!window->pPin->peer)
return VFW_E_NOT_CONNECTED;
This->hwndDrain = (HWND)Drain;
window->hwndDrain = (HWND)Drain;
return S_OK;
}
......
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