qedit/nullrenderer: Use strmbase_renderer_cleanup().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-05-15 18:16:59 -05:00 committed by Alexandre Julliard
parent cd131ca026
commit 3855216cb3
1 changed files with 2 additions and 4 deletions

View File

@ -113,11 +113,12 @@ static ULONG WINAPI NullRendererInner_AddRef(IUnknown *iface)
static ULONG WINAPI NullRendererInner_Release(IUnknown *iface)
{
NullRendererImpl *This = impl_from_IUnknown(iface);
ULONG refCount = BaseRendererImpl_Release(&This->renderer.filter.IBaseFilter_iface);
ULONG refCount = InterlockedDecrement(&This->renderer.filter.refCount);
if (!refCount)
{
TRACE("Destroying Null Renderer\n");
strmbase_renderer_cleanup(&This->renderer);
CoTaskMemFree(This);
}
@ -234,10 +235,7 @@ HRESULT NullRenderer_create(IUnknown *pUnkOuter, void **ppv)
(DWORD_PTR)(__FILE__ ": NullRendererImpl.csFilter"), &RendererFuncTable);
if (FAILED(hr))
{
BaseRendererImpl_Release(&pNullRenderer->renderer.filter.IBaseFilter_iface);
CoTaskMemFree(pNullRenderer);
}
else
*ppv = &pNullRenderer->IUnknown_inner;