Commit 53e842c9 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Return void from video_window_init().

parent 53b5c3b6
......@@ -111,7 +111,7 @@ struct video_window_ops
void video_window_cleanup(struct video_window *window) DECLSPEC_HIDDEN;
HRESULT video_window_create_window(struct video_window *window) DECLSPEC_HIDDEN;
HRESULT video_window_init(struct video_window *window, const IVideoWindowVtbl *vtbl,
void video_window_init(struct video_window *window, const IVideoWindowVtbl *vtbl,
struct strmbase_filter *filter, struct strmbase_pin *pin, const struct video_window_ops *ops) DECLSPEC_HIDDEN;
void video_window_unregister_class(void) DECLSPEC_HIDDEN;
......
......@@ -714,27 +714,24 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
strmbase_renderer_init(&object->renderer, outer, &CLSID_VideoRenderer, L"In", &renderer_ops);
object->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable,
video_window_init(&object->baseControlWindow, &IVideoWindow_VTable,
&object->renderer.filter, &object->renderer.sink.pin, &window_ops);
if (FAILED(hr))
goto fail;
basic_video_init(&object->baseControlVideo, &object->renderer.filter,
&object->renderer.sink.pin, &renderer_BaseControlVideoFuncTable);
if (FAILED(hr = video_window_create_window(&object->baseControlWindow)))
goto fail;
{
video_window_cleanup(&object->baseControlWindow);
strmbase_renderer_cleanup(&object->renderer);
free(object);
return hr;
}
object->run_event = CreateEventW(NULL, TRUE, FALSE, NULL);
TRACE("Created video renderer %p.\n", object);
*out = &object->renderer.filter.IUnknown_inner;
return S_OK;
fail:
strmbase_renderer_cleanup(&object->renderer);
free(object);
return hr;
}
HRESULT video_renderer_default_create(IUnknown *outer, IUnknown **out)
......
......@@ -2318,13 +2318,17 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
object->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl;
object->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = video_window_init(&object->baseControlWindow, &IVideoWindow_VTable,
video_window_init(&object->baseControlWindow, &IVideoWindow_VTable,
&object->renderer.filter, &object->renderer.sink.pin, &window_ops);
if (FAILED(hr))
goto fail;
if (FAILED(hr = video_window_create_window(&object->baseControlWindow)))
goto fail;
{
video_window_cleanup(&object->baseControlWindow);
strmbase_renderer_cleanup(&object->renderer);
FreeLibrary(object->hD3d9);
free(object);
return hr;
}
basic_video_init(&object->baseControlVideo, &object->renderer.filter,
&object->renderer.sink.pin, &renderer_BaseControlVideoFuncTable);
......@@ -2333,13 +2337,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
TRACE("Created VMR %p.\n", object);
*out = &object->renderer.filter.IUnknown_inner;
return hr;
fail:
strmbase_renderer_cleanup(&object->renderer);
FreeLibrary(object->hD3d9);
free(object);
return hr;
return S_OK;
}
HRESULT vmr7_create(IUnknown *outer, IUnknown **out)
......
......@@ -662,7 +662,7 @@ void video_window_unregister_class(void)
ERR("Failed to unregister class, error %u.\n", GetLastError());
}
HRESULT video_window_init(struct video_window *window, const IVideoWindowVtbl *vtbl,
void video_window_init(struct video_window *window, const IVideoWindowVtbl *vtbl,
struct strmbase_filter *owner, struct strmbase_pin *pin, const struct video_window_ops *ops)
{
memset(window, 0, sizeof(*window));
......@@ -671,7 +671,6 @@ HRESULT video_window_init(struct video_window *window, const IVideoWindowVtbl *v
window->AutoShow = OATRUE;
window->pFilter = owner;
window->pPin = pin;
return S_OK;
}
void video_window_cleanup(struct video_window *window)
......
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