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);