Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/smartteefilter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index 268e7a2209..cbcbc455ed 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -104,7 +104,7 @@ static ULONG WINAPI Unknown_AddRef(IUnknown *iface) static ULONG WINAPI Unknown_Release(IUnknown *iface) { SmartTeeFilter *This = impl_from_IUnknown(iface); - ULONG ref = BaseFilterImpl_Release(&This->filter.IBaseFilter_iface); + ULONG ref = InterlockedDecrement(&This->filter.refCount);
TRACE("(%p)->() ref=%d\n", This, ref);
@@ -115,6 +115,7 @@ static ULONG WINAPI Unknown_Release(IUnknown *iface) BaseOutputPinImpl_Release(&This->capture->pin.IPin_iface); if(This->preview) BaseOutputPinImpl_Release(&This->preview->pin.IPin_iface); + strmbase_filter_cleanup(&This->filter); CoTaskMemFree(This); } return ref; @@ -597,8 +598,8 @@ IUnknown* WINAPI QCAP_createSmartTeeFilter(IUnknown *outer, HRESULT *phr)
This = CoTaskMemAlloc(sizeof(*This)); if (This == NULL) { - hr = E_OUTOFMEMORY; - goto end; + *phr = E_OUTOFMEMORY; + return NULL; } memset(This, 0, sizeof(*This)); This->IUnknown_iface.lpVtbl = &UnknownVtbl; @@ -638,8 +639,7 @@ end: else return (IUnknown*)&This->filter.IBaseFilter_iface; } else { - if (This) - IBaseFilter_Release(&This->filter.IBaseFilter_iface); + strmbase_filter_cleanup(&This->filter); return NULL; } }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/avico.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index 83a7804801..5ea4016a65 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -150,7 +150,7 @@ static HRESULT WINAPI AVICompressor_QueryInterface(IBaseFilter *iface, REFIID ri static ULONG WINAPI AVICompressor_Release(IBaseFilter *iface) { AVICompressor *This = impl_from_IBaseFilter(iface); - ULONG ref = BaseFilterImpl_Release(&This->filter.IBaseFilter_iface); + ULONG ref = InterlockedDecrement(&This->filter.refCount);
TRACE("(%p) ref=%d\n", This, ref);
@@ -162,6 +162,7 @@ static ULONG WINAPI AVICompressor_Release(IBaseFilter *iface) BaseInputPinImpl_Release(&This->in->pin.IPin_iface); if(This->out) BaseOutputPinImpl_Release(&This->out->pin.IPin_iface); + strmbase_filter_cleanup(&This->filter); heap_free(This); }
@@ -685,7 +686,7 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) hres = BaseInputPin_Construct(&AVICompressorInputPinVtbl, sizeof(BaseInputPin), &in_pin_info, &AVICompressorBaseInputPinVtbl, &compressor->filter.csFilter, NULL, (IPin**)&compressor->in); if(FAILED(hres)) { - IBaseFilter_Release(&compressor->filter.IBaseFilter_iface); + strmbase_filter_cleanup(&compressor->filter); *phr = hres; return NULL; } @@ -694,7 +695,7 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) hres = BaseOutputPin_Construct(&AVICompressorOutputPinVtbl, sizeof(BaseOutputPin), &out_pin_info, &AVICompressorBaseOutputPinVtbl, &compressor->filter.csFilter, (IPin**)&compressor->out); if(FAILED(hres)) { - IBaseFilter_Release(&compressor->filter.IBaseFilter_iface); + strmbase_filter_cleanup(&compressor->filter); *phr = hres; return NULL; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/audiorecord.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/qcap/audiorecord.c b/dlls/qcap/audiorecord.c index 12b62a4a81..373bc9a025 100644 --- a/dlls/qcap/audiorecord.c +++ b/dlls/qcap/audiorecord.c @@ -99,9 +99,10 @@ static ULONG WINAPI Unknown_AddRef(IUnknown *iface) static ULONG WINAPI Unknown_Release(IUnknown *iface) { AudioRecord *This = impl_from_IUnknown(iface); - ULONG ref = BaseFilterImpl_Release(&This->filter.IBaseFilter_iface); + ULONG ref = InterlockedDecrement(&This->filter.refCount); TRACE("(%p/%p)->() ref=%d\n", iface, This, ref); if (!ref) { + strmbase_filter_cleanup(&This->filter); CoTaskMemFree(This); } return ref;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/samplegrabber.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 56947a1f6b..bc91f72af1 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -319,13 +319,14 @@ static ULONG WINAPI SampleGrabber_AddRef(IUnknown *iface) static ULONG WINAPI SampleGrabber_Release(IUnknown *iface) { SG_Impl *This = impl_from_IUnknown(iface); - ULONG ref = BaseFilterImpl_Release(&This->filter.IBaseFilter_iface); + ULONG ref = InterlockedDecrement(&This->filter.refCount);
TRACE("(%p) ref=%d\n", This, ref);
if (ref == 0) { SampleGrabber_cleanup(This); + strmbase_filter_cleanup(&This->filter); CoTaskMemFree(This); } return ref;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 9798ea71a2..2af8a1ff6d 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -125,7 +125,7 @@ HRESULT Parser_Create(ParserImpl *pParser, const IBaseFilterVtbl *Parser_Vtbl, else { CoTaskMemFree(pParser->ppPins); - BaseFilterImpl_Release(&pParser->filter.IBaseFilter_iface); + strmbase_filter_cleanup(&pParser->filter); CoTaskMemFree(pParser); }