strmbase: Destroy base class after child class.

This commit is contained in:
Thomas Faber 2014-07-18 22:23:36 +02:00 committed by Alexandre Julliard
parent 992f5345ed
commit 3dbcadc278
2 changed files with 4 additions and 2 deletions

View File

@ -294,7 +294,7 @@ HRESULT WINAPI BaseRendererImpl_QueryInterface(IBaseFilter* iface, REFIID riid,
ULONG WINAPI BaseRendererImpl_Release(IBaseFilter* iface)
{
BaseRenderer *This = impl_from_IBaseFilter(iface);
ULONG refCount = BaseFilterImpl_Release(iface);
ULONG refCount = InterlockedDecrement(&This->filter.refCount);
if (!refCount)
{
@ -319,6 +319,7 @@ ULONG WINAPI BaseRendererImpl_Release(IBaseFilter* iface)
CloseHandle(This->ThreadSignal);
CloseHandle(This->RenderEvent);
QualityControlImpl_Destroy(This->qcimpl);
BaseFilter_Destroy(&This->filter);
}
return refCount;
}

View File

@ -313,7 +313,7 @@ HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter * iface, REFIID ri
ULONG WINAPI TransformFilterImpl_Release(IBaseFilter * iface)
{
TransformFilter *This = impl_from_IBaseFilter(iface);
ULONG refCount = BaseFilterImpl_Release(iface);
ULONG refCount = InterlockedDecrement(&This->filter.refCount);
TRACE("(%p/%p)->() Release from %d\n", This, iface, refCount + 1);
@ -343,6 +343,7 @@ ULONG WINAPI TransformFilterImpl_Release(IBaseFilter * iface)
FreeMediaType(&This->pmt);
QualityControlImpl_Destroy(This->qcimpl);
IUnknown_Release(This->seekthru_unk);
BaseFilter_Destroy(&This->filter);
CoTaskMemFree(This);
return 0;