Commit 0777941e authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Return void from strmbase_renderer_init().

parent 9829385c
...@@ -64,20 +64,15 @@ static const struct strmbase_renderer_ops renderer_ops = ...@@ -64,20 +64,15 @@ static const struct strmbase_renderer_ops renderer_ops =
HRESULT null_renderer_create(IUnknown *outer, IUnknown **out) HRESULT null_renderer_create(IUnknown *outer, IUnknown **out)
{ {
HRESULT hr;
NullRendererImpl *pNullRenderer; NullRendererImpl *pNullRenderer;
*out = NULL; *out = NULL;
pNullRenderer = CoTaskMemAlloc(sizeof(NullRendererImpl)); pNullRenderer = CoTaskMemAlloc(sizeof(NullRendererImpl));
hr = strmbase_renderer_init(&pNullRenderer->renderer, outer, strmbase_renderer_init(&pNullRenderer->renderer, outer,
&CLSID_NullRenderer, L"In", &renderer_ops); &CLSID_NullRenderer, L"In", &renderer_ops);
if (FAILED(hr)) *out = &pNullRenderer->renderer.filter.IUnknown_inner;
CoTaskMemFree(pNullRenderer);
else
*out = &pNullRenderer->renderer.filter.IUnknown_inner;
return S_OK; return S_OK;
} }
...@@ -825,12 +825,8 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) ...@@ -825,12 +825,8 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
memset(object, 0, sizeof(*object)); memset(object, 0, sizeof(*object));
if (FAILED(hr = strmbase_renderer_init(&object->renderer, outer, strmbase_renderer_init(&object->renderer, outer,
&CLSID_DSoundRender, L"Audio Input pin (rendered)", &renderer_ops))) &CLSID_DSoundRender, L"Audio Input pin (rendered)", &renderer_ops);
{
CoTaskMemFree(object);
return hr;
}
if (FAILED(hr = system_clock_create(&object->renderer.filter.IUnknown_inner, &object->system_clock))) if (FAILED(hr = system_clock_create(&object->renderer.filter.IUnknown_inner, &object->system_clock)))
{ {
......
...@@ -716,12 +716,9 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out) ...@@ -716,12 +716,9 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
pVideoRenderer->IOverlay_iface.lpVtbl = &overlay_vtbl; pVideoRenderer->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = strmbase_renderer_init(&pVideoRenderer->renderer, outer, strmbase_renderer_init(&pVideoRenderer->renderer, outer,
&CLSID_VideoRenderer, L"In", &renderer_ops); &CLSID_VideoRenderer, L"In", &renderer_ops);
if (FAILED(hr))
goto fail;
hr = video_window_init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, hr = video_window_init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable,
&pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.sink.pin, &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.sink.pin,
&renderer_BaseWindowFuncTable); &renderer_BaseWindowFuncTable);
......
...@@ -2326,9 +2326,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) ...@@ -2326,9 +2326,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
pVMR->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl; pVMR->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl;
pVMR->IOverlay_iface.lpVtbl = &overlay_vtbl; pVMR->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = strmbase_renderer_init(&pVMR->renderer, outer, clsid, L"VMR Input0", &renderer_ops); strmbase_renderer_init(&pVMR->renderer, outer, clsid, L"VMR Input0", &renderer_ops);
if (FAILED(hr))
goto fail;
hr = video_window_init(&pVMR->baseControlWindow, &IVideoWindow_VTable, hr = video_window_init(&pVMR->baseControlWindow, &IVideoWindow_VTable,
&pVMR->renderer.filter, &pVMR->renderer.sink.pin, &renderer_BaseWindowFuncTable); &pVMR->renderer.filter, &pVMR->renderer.sink.pin, &renderer_BaseWindowFuncTable);
......
...@@ -388,7 +388,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa ...@@ -388,7 +388,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa
return hr; return hr;
} }
HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer, void strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_renderer_ops *ops) const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_renderer_ops *ops)
{ {
memset(filter, 0, sizeof(*filter)); memset(filter, 0, sizeof(*filter));
...@@ -408,6 +408,4 @@ HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown ...@@ -408,6 +408,4 @@ HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown
QualityControlImpl_Create(&filter->sink.pin, &filter->qcimpl); QualityControlImpl_Create(&filter->sink.pin, &filter->qcimpl);
filter->qcimpl->IQualityControl_iface.lpVtbl = &Renderer_QualityControl_Vtbl; filter->qcimpl->IQualityControl_iface.lpVtbl = &Renderer_QualityControl_Vtbl;
return S_OK;
} }
...@@ -327,6 +327,6 @@ struct strmbase_renderer_ops ...@@ -327,6 +327,6 @@ struct strmbase_renderer_ops
HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *filter, IMediaSample *sample); HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *filter, IMediaSample *sample);
HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer, void strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_renderer_ops *ops); const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_renderer_ops *ops);
void strmbase_renderer_cleanup(struct strmbase_renderer *filter); void strmbase_renderer_cleanup(struct strmbase_renderer *filter);
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