Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/nullrenderer.c | 9 ++------- dlls/quartz/dsoundrender.c | 8 ++------ dlls/quartz/videorenderer.c | 5 +---- dlls/quartz/vmr9.c | 4 +--- dlls/strmbase/renderer.c | 4 +--- include/wine/strmbase.h | 2 +- 6 files changed, 8 insertions(+), 24 deletions(-)
diff --git a/dlls/qedit/nullrenderer.c b/dlls/qedit/nullrenderer.c index cbebadfd180..9f29ab78283 100644 --- a/dlls/qedit/nullrenderer.c +++ b/dlls/qedit/nullrenderer.c @@ -64,20 +64,15 @@ static const struct strmbase_renderer_ops renderer_ops =
HRESULT null_renderer_create(IUnknown *outer, IUnknown **out) { - HRESULT hr; NullRendererImpl *pNullRenderer;
*out = NULL;
pNullRenderer = CoTaskMemAlloc(sizeof(NullRendererImpl));
- hr = strmbase_renderer_init(&pNullRenderer->renderer, outer, + strmbase_renderer_init(&pNullRenderer->renderer, outer, &CLSID_NullRenderer, L"In", &renderer_ops);
- if (FAILED(hr)) - CoTaskMemFree(pNullRenderer); - else - *out = &pNullRenderer->renderer.filter.IUnknown_inner; - + *out = &pNullRenderer->renderer.filter.IUnknown_inner; return S_OK; } diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index fc319644c60..6ed714c5899 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -806,12 +806,8 @@ HRESULT dsound_render_create(IUnknown *outer, IUnknown **out) return E_OUTOFMEMORY; memset(object, 0, sizeof(*object));
- if (FAILED(hr = strmbase_renderer_init(&object->renderer, outer, - &CLSID_DSoundRender, L"Audio Input pin (rendered)", &renderer_ops))) - { - CoTaskMemFree(object); - return hr; - } + strmbase_renderer_init(&object->renderer, outer, + &CLSID_DSoundRender, L"Audio Input pin (rendered)", &renderer_ops);
if (FAILED(hr = system_clock_create(&object->renderer.filter.IUnknown_inner, &object->system_clock))) { diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 37227bfa210..9301e8d769c 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -716,12 +716,9 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
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);
- if (FAILED(hr)) - goto fail; - hr = video_window_init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.sink.pin, &renderer_BaseWindowFuncTable); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index b2217547cdc..c44607b3ef2 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2326,9 +2326,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) pVMR->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl; pVMR->IOverlay_iface.lpVtbl = &overlay_vtbl;
- hr = strmbase_renderer_init(&pVMR->renderer, outer, clsid, L"VMR Input0", &renderer_ops); - if (FAILED(hr)) - goto fail; + strmbase_renderer_init(&pVMR->renderer, outer, clsid, L"VMR Input0", &renderer_ops);
hr = video_window_init(&pVMR->baseControlWindow, &IVideoWindow_VTable, &pVMR->renderer.filter, &pVMR->renderer.sink.pin, &renderer_BaseWindowFuncTable); diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 57e0d2041ca..fd999d3ae96 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -388,7 +388,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa 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) { memset(filter, 0, sizeof(*filter)); @@ -408,6 +408,4 @@ HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown
QualityControlImpl_Create(&filter->sink.pin, &filter->qcimpl); filter->qcimpl->IQualityControl_iface.lpVtbl = &Renderer_QualityControl_Vtbl; - - return S_OK; } diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 732ba1be269..6789957e50a 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -327,6 +327,6 @@ struct strmbase_renderer_ops
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); void strmbase_renderer_cleanup(struct strmbase_renderer *filter);