Commit 992f5345 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

strmbase: Separate BaseFilter destructor from Release.

parent 509bdae8
......@@ -69,14 +69,7 @@ ULONG WINAPI BaseFilterImpl_Release(IBaseFilter * iface)
TRACE("(%p)->() Release from %d\n", This, refCount + 1);
if (!refCount)
{
if (This->pClock)
IReferenceClock_Release(This->pClock);
This->IBaseFilter_iface.lpVtbl = NULL;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
}
BaseFilter_Destroy(This);
return refCount;
}
......@@ -218,3 +211,15 @@ HRESULT WINAPI BaseFilter_Init(BaseFilter * This, const IBaseFilterVtbl *Vtbl, c
return S_OK;
}
HRESULT WINAPI BaseFilter_Destroy(BaseFilter * This)
{
if (This->pClock)
IReferenceClock_Release(This->pClock);
This->IBaseFilter_iface.lpVtbl = NULL;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
return S_OK;
}
......@@ -194,6 +194,7 @@ LONG WINAPI BaseFilterImpl_GetPinVersion(BaseFilter* This);
VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter* This);
HRESULT WINAPI BaseFilter_Init(BaseFilter * This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable* pBaseFuncsTable);
HRESULT WINAPI BaseFilter_Destroy(BaseFilter * This);
/* Enums */
HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes ** ppEnum);
......
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