strmbase: Avoid leaking references to the sink's peer in IVideoWindow::SetWindowForeground().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cc3f73be74
commit
d2b2e60ada
|
@ -2076,7 +2076,7 @@ static void test_video_window(void)
|
||||||
ref = IBaseFilter_Release(filter);
|
ref = IBaseFilter_Release(filter);
|
||||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||||
ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface);
|
ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface);
|
||||||
todo_wine ok(!ref, "Got outstanding refcount %d.\n", ref);
|
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||||
DestroyWindow(our_hwnd);
|
DestroyWindow(our_hwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -658,16 +658,13 @@ HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LO
|
||||||
{
|
{
|
||||||
BaseControlWindow *window = impl_from_IVideoWindow(iface);
|
BaseControlWindow *window = impl_from_IVideoWindow(iface);
|
||||||
UINT flags = SWP_NOMOVE | SWP_NOSIZE;
|
UINT flags = SWP_NOMOVE | SWP_NOSIZE;
|
||||||
IPin* pPin;
|
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
TRACE("window %p, focus %d.\n", window, focus);
|
TRACE("window %p, focus %d.\n", window, focus);
|
||||||
|
|
||||||
if (focus != OAFALSE && focus != OATRUE)
|
if (focus != OAFALSE && focus != OATRUE)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
hr = IPin_ConnectedTo(&window->pPin->IPin_iface, &pPin);
|
if (!window->pPin->peer)
|
||||||
if ((hr != S_OK) || !pPin)
|
|
||||||
return VFW_E_NOT_CONNECTED;
|
return VFW_E_NOT_CONNECTED;
|
||||||
|
|
||||||
if (!focus)
|
if (!focus)
|
||||||
|
|
Loading…
Reference in New Issue