Commit 3c98e11b authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Reimplement BaseFilterImpl_Release() using a destructor callback.

parent 1fc5c6b7
......@@ -54,7 +54,7 @@ ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter * iface)
return refCount;
}
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter * iface)
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface)
{
BaseFilter *This = impl_from_IBaseFilter(iface);
ULONG refCount = InterlockedDecrement(&This->refCount);
......@@ -62,7 +62,7 @@ ULONG WINAPI BaseFilterImpl_Release(IBaseFilter * iface)
TRACE("(%p)->() Release from %d\n", This, refCount + 1);
if (!refCount)
strmbase_filter_cleanup(This);
This->pFuncsTable->filter_destroy(This);
return refCount;
}
......
......@@ -171,6 +171,7 @@ typedef struct BaseFilter
typedef struct BaseFilterFuncTable
{
IPin *(*filter_get_pin)(BaseFilter *iface, unsigned int index);
void (*filter_destroy)(BaseFilter *iface);
} BaseFilterFuncTable;
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
......
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