Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/parser.c | 13 ------------- dlls/quartz/parser.h | 1 - dlls/quartz/waveparser.c | 9 ++++++++- 3 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 433502ced70..095ec5eb17b 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -191,19 +191,6 @@ void Parser_Destroy(ParserImpl *This) CoTaskMemFree(This); }
-ULONG WINAPI Parser_Release(IBaseFilter * iface) -{ - ParserImpl *This = impl_from_IBaseFilter(iface); - ULONG refCount = InterlockedDecrement(&This->filter.refCount); - - TRACE("(%p)->() Release from %d\n", This, refCount + 1); - - if (!refCount) - Parser_Destroy(This); - - return refCount; -} - /** IPersist methods **/
HRESULT WINAPI Parser_GetClassID(IBaseFilter * iface, CLSID * pClsid) diff --git a/dlls/quartz/parser.h b/dlls/quartz/parser.h index d221eec555f..4d51e3afd83 100644 --- a/dlls/quartz/parser.h +++ b/dlls/quartz/parser.h @@ -63,7 +63,6 @@ extern void Parser_Destroy(ParserImpl *This);
extern HRESULT WINAPI Parser_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv); extern ULONG WINAPI Parser_AddRef(IBaseFilter * iface); -extern ULONG WINAPI Parser_Release(IBaseFilter * iface); extern HRESULT WINAPI Parser_GetClassID(IBaseFilter * iface, CLSID * pClsid); extern HRESULT WINAPI Parser_Stop(IBaseFilter * iface); extern HRESULT WINAPI Parser_Pause(IBaseFilter * iface); diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index 6240b7817f3..1b18f69241e 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -398,7 +398,7 @@ static const IBaseFilterVtbl WAVEParser_Vtbl = { Parser_QueryInterface, Parser_AddRef, - Parser_Release, + BaseFilterImpl_Release, Parser_GetClassID, Parser_Stop, Parser_Pause, @@ -413,9 +413,16 @@ static const IBaseFilterVtbl WAVEParser_Vtbl = Parser_QueryVendorInfo };
+static void wave_parser_destroy(BaseFilter *iface) +{ + WAVEParserImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); + Parser_Destroy(&filter->Parser); +} + static const BaseFilterFuncTable wave_parser_func_table = { .filter_get_pin = parser_get_pin, + .filter_destroy = wave_parser_destroy, };
HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)