Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/tests/nullrenderer.c | 10 +++++----- dlls/quartz/tests/dsoundrender.c | 8 +++----- dlls/quartz/tests/videorenderer.c | 8 +++----- dlls/quartz/tests/vmr7.c | 4 ++-- dlls/quartz/tests/vmr9.c | 4 ++-- dlls/strmbase/renderer.c | 18 +++++++++++++++--- 6 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/dlls/qedit/tests/nullrenderer.c b/dlls/qedit/tests/nullrenderer.c index a45f30a3092..d39b28d5779 100644 --- a/dlls/qedit/tests/nullrenderer.c +++ b/dlls/qedit/tests/nullrenderer.c @@ -122,9 +122,9 @@ static void test_enum_pins(void) hr = IEnumPins_Next(enum1, 1, pins, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pins[0]); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %d.\n", ref); IPin_Release(pins[0]); @@ -226,7 +226,7 @@ static void test_pin_info(void) hr = IBaseFilter_FindPin(filter, sink_id, &pin); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - todo_wine ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); ok(ref == 2, "Got unexpected refcount %d.\n", ref);
@@ -236,9 +236,9 @@ static void test_pin_info(void) ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c index 44c7119552a..cf7b0e32b41 100644 --- a/dlls/quartz/tests/dsoundrender.c +++ b/dlls/quartz/tests/dsoundrender.c @@ -288,10 +288,8 @@ static void test_enum_pins(void) hr = IEnumPins_Next(enum1, 1, pins, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); -todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pins[0]); -todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %d.\n", ref); @@ -399,7 +397,7 @@ static void test_pin_info(void) hr = IBaseFilter_FindPin(filter, sink_id, &pin); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - todo_wine ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); ok(ref == 2, "Got unexpected refcount %d.\n", ref);
@@ -409,9 +407,9 @@ static void test_pin_info(void) ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index fdd4dfb954f..0b9ea3ff873 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -221,10 +221,8 @@ static void test_enum_pins(void) hr = IEnumPins_Next(enum1, 1, pins, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); -todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pins[0]); -todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %d.\n", ref); @@ -329,7 +327,7 @@ static void test_pin_info(void) hr = IBaseFilter_FindPin(filter, sink_id, &pin); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - todo_wine ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); ok(ref == 2, "Got unexpected refcount %d.\n", ref);
@@ -340,9 +338,9 @@ static void test_pin_info(void) todo_wine ok(!lstrcmpW(info.achName, sink_name), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index ee80590cc1d..e702be70609 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -427,9 +427,9 @@ static void test_enum_pins(void) hr = IEnumPins_Next(enum1, 1, pins, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pins[0]); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %d.\n", ref); IPin_Release(pins[0]); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 13f6e196adf..d14a9705393 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -435,9 +435,9 @@ static void test_enum_pins(void) hr = IEnumPins_Next(enum1, 1, pins, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pins[0]); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %d.\n", ref); IPin_Release(pins[0]); diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index b1b318f54f2..36e934f2232 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -45,6 +45,18 @@ static const IQualityControlVtbl Renderer_QualityControl_Vtbl = { QualityControlImpl_SetSink };
+static ULONG WINAPI BaseRenderer_InputPin_AddRef(IPin *iface) +{ + BaseInputPin *pin = impl_BaseInputPin_from_IPin(iface); + return IBaseFilter_AddRef(pin->pin.pinInfo.pFilter); +} + +static ULONG WINAPI BaseRenderer_InputPin_Release(IPin *iface) +{ + BaseInputPin *pin = impl_BaseInputPin_from_IPin(iface); + return IBaseFilter_Release(pin->pin.pinInfo.pFilter); +} + static HRESULT WINAPI BaseRenderer_InputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) { BaseInputPin *This = impl_BaseInputPin_from_IPin(iface); @@ -164,8 +176,8 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface) static const IPinVtbl BaseRenderer_InputPin_Vtbl = { BaseInputPinImpl_QueryInterface, - BasePinImpl_AddRef, - BaseInputPinImpl_Release, + BaseRenderer_InputPin_AddRef, + BaseRenderer_InputPin_Release, BaseInputPinImpl_Connect, BaseRenderer_InputPin_ReceiveConnection, BaseRenderer_InputPin_Disconnect, @@ -298,7 +310,7 @@ void strmbase_renderer_cleanup(BaseRenderer *filter) IPin_Release(peer); } IPin_Disconnect(&filter->pInputPin->pin.IPin_iface); - IPin_Release(&filter->pInputPin->pin.IPin_iface); + BaseInputPin_Destroy(filter->pInputPin);
if (filter->pPosition) IUnknown_Release(filter->pPosition);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/vfwcapture.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 0bf8c45d9c0..2cb1f7dece5 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -97,6 +97,11 @@ typedef struct VfwPinImpl VfwCapture *parent; } VfwPinImpl;
+static inline VfwPinImpl *impl_from_IPin(IPin *iface) +{ + return CONTAINING_RECORD(iface, VfwPinImpl, pin.pin.IPin_iface); +} + static IPin *vfw_capture_get_pin(BaseFilter *iface, unsigned int index) { VfwCapture *This = impl_from_BaseFilter(iface); @@ -125,7 +130,7 @@ static void vfw_capture_destroy(BaseFilter *iface) IPin_Disconnect(filter->pOutputPin); IPin_Release(peer); } - IPin_Release(filter->pOutputPin); + BaseOutputPin_Destroy(&impl_from_IPin(filter->pOutputPin)->pin); strmbase_filter_cleanup(&filter->filter); CoTaskMemFree(filter); ObjectRefCount(FALSE); @@ -648,11 +653,6 @@ VfwPin_Construct( IBaseFilter * pBaseFilter, LPCRITICAL_SECTION pCritSec, return hr; }
-static inline VfwPinImpl *impl_from_IPin(IPin *iface) -{ - return CONTAINING_RECORD(iface, VfwPinImpl, pin.pin.IPin_iface); -} - static HRESULT WINAPI VfwPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) { VfwPinImpl *This = impl_from_IPin(iface); @@ -677,20 +677,17 @@ static HRESULT WINAPI VfwPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * return E_NOINTERFACE; }
+static ULONG WINAPI VfwPin_AddRef(IPin *iface) +{ + VfwPinImpl *pin = impl_from_IPin(iface); + return IBaseFilter_AddRef(pin->pin.pin.pinInfo.pFilter); +} + static ULONG WINAPI VfwPin_Release(IPin * iface) { - VfwPinImpl *This = impl_from_IPin(iface); - ULONG refCount = InterlockedDecrement(&This->pin.pin.refCount); - - TRACE("() -> new refcount: %u\n", refCount); - - if (!refCount) - { - BaseOutputPin_Destroy(&This->pin); - ObjectRefCount(FALSE); - } - return refCount; + VfwPinImpl *pin = impl_from_IPin(iface); + return IBaseFilter_Release(pin->pin.pin.pinInfo.pFilter); }
static HRESULT WINAPI @@ -719,7 +716,7 @@ VfwPin_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin) static const IPinVtbl VfwPin_Vtbl = { VfwPin_QueryInterface, - BasePinImpl_AddRef, + VfwPin_AddRef, VfwPin_Release, BaseOutputPinImpl_Connect, BaseOutputPinImpl_ReceiveConnection,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53820
Your paranoid android.
=== debian9 (build log) ===
Task: WineTest did not produce the wow32 report
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/gstdemux.c | 45 ++++++++++++++--------------------- 1 file changed, 18 insertions(+), 27 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index fcb909bebc7..9b489c40fe4 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1207,7 +1207,6 @@ static void gstdemux_destroy(BaseFilter *iface) { GSTImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); IPin *connected = NULL; - ULONG pinref; HRESULT hr;
CloseHandle(filter->no_more_pads_event); @@ -1223,16 +1222,16 @@ static void gstdemux_destroy(BaseFilter *iface) hr = IPin_Disconnect(&filter->pInputPin.pin.IPin_iface); assert(hr == S_OK); } - pinref = IPin_Release(&filter->pInputPin.pin.IPin_iface); - if (pinref) - { - /* Valgrind could find this, if I kill it here */ - ERR("pinref should be null, is %u, destroying anyway\n", pinref); - assert((LONG)pinref > 0);
- while (pinref) - pinref = IPin_Release(&filter->pInputPin.pin.IPin_iface); - } + FreeMediaType(&filter->pInputPin.pin.mtCurrent); + if (filter->pInputPin.pAlloc) + IMemAllocator_Release(filter->pInputPin.pAlloc); + filter->pInputPin.pAlloc = NULL; + if (filter->pInputPin.pReader) + IAsyncReader_Release(filter->pInputPin.pReader); + filter->pInputPin.pReader = NULL; + filter->pInputPin.pin.IPin_iface.lpVtbl = NULL; + if (filter->bus) { gst_bus_set_sync_handler(filter->bus, NULL, NULL, NULL); @@ -1888,24 +1887,16 @@ static inline GSTInPin *impl_sink_from_IPin(IPin *iface) return CONTAINING_RECORD(iface, GSTInPin, pin.IPin_iface); }
-static ULONG WINAPI GSTInPin_Release(IPin *iface) +static ULONG WINAPI GSTInPin_AddRef(IPin *iface) { - GSTInPin *This = impl_sink_from_IPin(iface); - ULONG refCount = InterlockedDecrement(&This->pin.refCount); + GSTInPin *pin = impl_sink_from_IPin(iface); + return IBaseFilter_AddRef(pin->pin.pinInfo.pFilter); +}
- TRACE("(%p)->() Release from %d\n", iface, refCount + 1); - if (!refCount) { - FreeMediaType(&This->pin.mtCurrent); - if (This->pAlloc) - IMemAllocator_Release(This->pAlloc); - This->pAlloc = NULL; - if (This->pReader) - IAsyncReader_Release(This->pReader); - This->pReader = NULL; - This->pin.IPin_iface.lpVtbl = NULL; - return 0; - } else - return refCount; +static ULONG WINAPI GSTInPin_Release(IPin *iface) +{ + GSTInPin *pin = impl_sink_from_IPin(iface); + return IBaseFilter_Release(pin->pin.pinInfo.pFilter); }
static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) @@ -2090,7 +2081,7 @@ static HRESULT WINAPI GSTInPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppE
static const IPinVtbl GST_InputPin_Vtbl = { GSTInPin_QueryInterface, - BasePinImpl_AddRef, + GSTInPin_AddRef, GSTInPin_Release, BaseInputPinImpl_Connect, GSTInPin_ReceiveConnection,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53821
Your paranoid android.
=== debian9 (build log) ===
Task: WineTest did not produce the wow32 report
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/gstdemux.c | 99 ++++++++++++++++------------------- 1 file changed, 44 insertions(+), 55 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 9b489c40fe4..38d1b9ec138 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1684,41 +1684,16 @@ static HRESULT WINAPI GSTOutPin_QueryInterface(IPin *iface, REFIID riid, void ** return E_NOINTERFACE; }
-static ULONG WINAPI GSTOutPin_Release(IPin *iface) +static ULONG WINAPI GSTOutPin_AddRef(IPin *iface) { - GSTOutPin *This = impl_source_from_IPin(iface); - ULONG refCount = InterlockedDecrement(&This->pin.pin.refCount); - - TRACE("(%p)->() Release from %d\n", This, refCount + 1); - - mark_wine_thread(); + GSTOutPin *pin = impl_source_from_IPin(iface); + return IBaseFilter_AddRef(pin->pin.pin.pinInfo.pFilter); +}
- if (!refCount) { - if (This->their_src) { - if (This->flipfilter) { - gst_pad_unlink(This->their_src, This->flip_sink); - gst_pad_unlink(This->flip_src, This->my_sink); - gst_object_unref(This->flip_src); - gst_object_unref(This->flip_sink); - This->flipfilter = NULL; - This->flip_src = This->flip_sink = NULL; - } else - gst_pad_unlink(This->their_src, This->my_sink); - gst_object_unref(This->their_src); - } - gst_object_unref(This->my_sink); - CloseHandle(This->caps_event); - DeleteMediaType(This->pmt); - FreeMediaType(&This->pin.pin.mtCurrent); - gst_segment_free(This->segment); - if(This->gstpool) - gst_object_unref(This->gstpool); - if (This->pin.pAllocator) - IMemAllocator_Release(This->pin.pAllocator); - CoTaskMemFree(This); - return 0; - } - return refCount; +static ULONG WINAPI GSTOutPin_Release(IPin *iface) +{ + GSTOutPin *pin = impl_source_from_IPin(iface); + return IBaseFilter_Release(pin->pin.pin.pinInfo.pFilter); }
static HRESULT WINAPI GSTOutPin_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt) @@ -1776,30 +1751,47 @@ static HRESULT WINAPI GSTOutPin_DecideAllocator(BaseOutputPin *base, IMemInputPi return hr; }
-static HRESULT break_source_connection(BaseOutputPin *This) +static void free_source_pin(GSTOutPin *pin) { - HRESULT hr; - - TRACE("(%p)->()\n", This); - - EnterCriticalSection(This->pin.pCritSec); - if (!This->pin.pConnectedTo || !This->pMemInputPin) - hr = VFW_E_NOT_CONNECTED; - else + EnterCriticalSection(pin->pin.pin.pCritSec); + if (pin->pin.pin.pConnectedTo) { - hr = IMemAllocator_Decommit(This->pAllocator); - if (SUCCEEDED(hr)) - hr = IPin_Disconnect(This->pin.pConnectedTo); - IPin_Disconnect((IPin *)This); + if (SUCCEEDED(IMemAllocator_Decommit(pin->pin.pAllocator))) + IPin_Disconnect(pin->pin.pin.pConnectedTo); + IPin_Disconnect(&pin->pin.pin.IPin_iface); } - LeaveCriticalSection(This->pin.pCritSec); + LeaveCriticalSection(pin->pin.pin.pCritSec);
- return hr; + if (pin->their_src) + { + if (pin->flipfilter) + { + gst_pad_unlink(pin->their_src, pin->flip_sink); + gst_pad_unlink(pin->flip_src, pin->my_sink); + gst_object_unref(pin->flip_src); + gst_object_unref(pin->flip_sink); + pin->flipfilter = NULL; + pin->flip_src = pin->flip_sink = NULL; + } + else + gst_pad_unlink(pin->their_src, pin->my_sink); + gst_object_unref(pin->their_src); + } + gst_object_unref(pin->my_sink); + CloseHandle(pin->caps_event); + DeleteMediaType(pin->pmt); + FreeMediaType(&pin->pin.pin.mtCurrent); + gst_segment_free(pin->segment); + if (pin->gstpool) + gst_object_unref(pin->gstpool); + if (pin->pin.pAllocator) + IMemAllocator_Release(pin->pin.pAllocator); + CoTaskMemFree(pin); }
static const IPinVtbl GST_OutputPin_Vtbl = { GSTOutPin_QueryInterface, - BasePinImpl_AddRef, + GSTOutPin_AddRef, GSTOutPin_Release, BaseOutputPinImpl_Connect, BaseOutputPinImpl_ReceiveConnection, @@ -1853,7 +1845,6 @@ static HRESULT GST_AddPin(GSTImpl *This, const PIN_INFO *piOutput, const AM_MEDI
static HRESULT GST_RemoveOutputPins(GSTImpl *This) { - HRESULT hr; ULONG i;
TRACE("(%p)\n", This); @@ -1867,11 +1858,9 @@ static HRESULT GST_RemoveOutputPins(GSTImpl *This) gst_object_unref(This->their_sink); This->my_src = This->their_sink = NULL;
- for (i = 0; i < This->cStreams; i++) { - hr = break_source_connection(&This->ppPins[i]->pin); - TRACE("Disconnect: %08x\n", hr); - IPin_Release(&This->ppPins[i]->pin.pin.IPin_iface); - } + for (i = 0; i < This->cStreams; ++i) + free_source_pin(This->ppPins[i]); + This->cStreams = 0; CoTaskMemFree(This->ppPins); This->ppPins = NULL;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53822
Your paranoid android.
=== debian9 (build log) ===
Task: WineTest did not produce the wow32 report
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- Not compile-tested.
dlls/wineqtdecoder/qtsplitter.c | 45 +++++++++++++-------------------- 1 file changed, 17 insertions(+), 28 deletions(-)
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index 3dd530fac3e..8a88729239c 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -225,7 +225,6 @@ static void qt_splitter_destroy(BaseFilter *iface) { QTSplitter *filter = impl_from_BaseFilter(iface); IPin *peer = NULL; - ULONG pinref;
EnterCriticalSection(&filter->csReceive); /* Don't need to clean up output pins, disconnecting input pin will do that */ @@ -235,15 +234,15 @@ static void qt_splitter_destroy(BaseFilter *iface) IPin_Disconnect(peer); IPin_Release(peer); } - pinref = IPin_Release(&filter->pInputPin.pin.IPin_iface); - if (pinref) - { - ERR("pinref should be null, is %u, destroying anyway\n", pinref); - assert((LONG)pinref > 0);
- while (pinref) - pinref = IPin_Release(&filter->pInputPin.pin.IPin_iface); - } + FreeMediaType(&filter->pInputPin.pin.mtCurrent); + if (filter->pInputPin.pAlloc) + IMemAllocator_Release(filter->pInputPin.pAlloc); + filter->pInputPin.pAlloc = NULL; + if (filter->pInputPin.pReader) + IAsyncReader_Release(filter->pInputPin.pReader); + filter->pInputPin.pReader = NULL; + filter->pInputPin.pin.IPin_iface.lpVtbl = NULL;
if (filter->pQTMovie) { @@ -833,26 +832,16 @@ static inline QTInPin *impl_from_IPin( IPin *iface ) return CONTAINING_RECORD(iface, QTInPin, pin.IPin_iface); }
-static ULONG WINAPI QTInPin_Release(IPin *iface) +static ULONG WINAPI QTInPin_AddRef(IPin *iface) { - QTInPin *This = impl_from_IPin(iface); - ULONG refCount = InterlockedDecrement(&This->pin.refCount); + QTInPin *pin = impl_from_IPin(iface); + return IBaseFilter_AddRef(pin->pin.pinInfo.pFilter); +}
- TRACE("(%p)->() Release from %d\n", iface, refCount + 1); - if (!refCount) - { - FreeMediaType(&This->pin.mtCurrent); - if (This->pAlloc) - IMemAllocator_Release(This->pAlloc); - This->pAlloc = NULL; - if (This->pReader) - IAsyncReader_Release(This->pReader); - This->pReader = NULL; - This->pin.IPin_iface.lpVtbl = NULL; - return 0; - } - else - return refCount; +static ULONG WINAPI QTInPin_Release(IPin *iface) +{ + QTInPin *pin = impl_from_IPin(iface); + return IBaseFilter_Release(pin->pin.pinInfo.pFilter); }
static HRESULT QT_Process_Video_Track(QTSplitter* filter, Track trk) @@ -1288,7 +1277,7 @@ static HRESULT WINAPI QTInPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEn
static const IPinVtbl QT_InputPin_Vtbl = { QTInPin_QueryInterface, - BasePinImpl_AddRef, + QTInPin_AddRef, QTInPin_Release, BaseInputPinImpl_Connect, QTInPin_ReceiveConnection,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53823
Your paranoid android.
=== debian9 (build log) ===
Task: WineTest did not produce the wow32 report
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53819
Your paranoid android.
=== debian9 (build log) ===
Task: WineTest did not produce the wow32 report