Zebediah Figura : strmbase: Reimplement BaseFilterImpl_Release() using a destructor callback.
Alexandre Julliard
julliard at winehq.org
Fri May 24 15:46:35 CDT 2019
Module: wine
Branch: master
Commit: 3c98e11b601fcdf1b4fdf59aa45dff36c0c45a17
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3c98e11b601fcdf1b4fdf59aa45dff36c0c45a17
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu May 23 17:06:33 2019 -0500
strmbase: Reimplement BaseFilterImpl_Release() using a destructor callback.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/strmbase/filter.c | 4 ++--
include/wine/strmbase.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/strmbase/filter.c b/dlls/strmbase/filter.c
index f9dd72c..cf8000f 100644
--- a/dlls/strmbase/filter.c
+++ b/dlls/strmbase/filter.c
@@ -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;
}
diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h
index 7c44b36..307204e 100644
--- a/include/wine/strmbase.h
+++ b/include/wine/strmbase.h
@@ -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);
More information about the wine-cvs
mailing list