strmbase: Separate BaseFilter destructor from Release.
This commit is contained in:
parent
509bdae8e2
commit
992f5345ed
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue