strmbase: Release the allocator in IPin::Disconnect() (Valgrind).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7ac949a101
commit
05f319a394
|
@ -1443,7 +1443,7 @@ static void test_connect_pin(void)
|
|||
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr);
|
||||
|
||||
ref = IMemAllocator_Release(allocator);
|
||||
todo_wine ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
IMemInputPin_Release(input);
|
||||
IPin_Release(pin);
|
||||
ref = IFilterGraph2_Release(graph);
|
||||
|
|
|
@ -3072,7 +3072,7 @@ static void test_renderless_formats(void)
|
|||
ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr);
|
||||
|
||||
hr = IMemInputPin_GetAllocator(input, &allocator);
|
||||
todo_wine_if (i == 0) ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr);
|
||||
todo_wine ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr);
|
||||
if (hr != S_OK)
|
||||
{
|
||||
test_allocator(input);
|
||||
|
|
|
@ -594,6 +594,13 @@ static HRESULT WINAPI source_Disconnect(IPin *iface)
|
|||
IMemInputPin_Release(This->pMemInputPin);
|
||||
This->pMemInputPin = NULL;
|
||||
}
|
||||
|
||||
if (This->pAllocator)
|
||||
{
|
||||
IMemAllocator_Release(This->pAllocator);
|
||||
This->pAllocator = NULL;
|
||||
}
|
||||
|
||||
if (This->pin.peer)
|
||||
{
|
||||
IPin_Release(This->pin.peer);
|
||||
|
@ -930,6 +937,12 @@ static HRESULT WINAPI sink_Disconnect(IPin *iface)
|
|||
if (pin->pFuncsTable->sink_disconnect)
|
||||
pin->pFuncsTable->sink_disconnect(pin);
|
||||
|
||||
if (pin->pAllocator)
|
||||
{
|
||||
IMemAllocator_Release(pin->pAllocator);
|
||||
pin->pAllocator = NULL;
|
||||
}
|
||||
|
||||
IPin_Release(pin->pin.peer);
|
||||
pin->pin.peer = NULL;
|
||||
FreeMediaType(&pin->pin.mt);
|
||||
|
|
Loading…
Reference in New Issue