winegstreamer: Fix reference leaks.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Akihiro Sagawa 2016-12-05 00:37:14 +09:00 committed by Alexandre Julliard
parent 17586e3082
commit 38586dcf48
2 changed files with 11 additions and 0 deletions

View File

@ -366,6 +366,13 @@ static void test_render_run(const WCHAR *file)
}
releasefiltergraph();
if (h != INVALID_HANDLE_VALUE) {
/* check reference leaks */
h = CreateFileW(file, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
ok(h != INVALID_HANDLE_VALUE, "CreateFile failed: err=%d\n", GetLastError());
CloseHandle(h);
}
}
static void test_graph_builder(void)

View File

@ -1951,6 +1951,9 @@ static ULONG WINAPI GSTInPin_Release(IPin *iface)
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
@ -2048,6 +2051,7 @@ static HRESULT WINAPI GSTInPin_Disconnect(IPin *iface)
if (SUCCEEDED(hr) && state == State_Stopped) {
IMemAllocator_Decommit(This->pAlloc);
IPin_Disconnect(This->pin.pConnectedTo);
IPin_Release(This->pin.pConnectedTo);
This->pin.pConnectedTo = NULL;
hr = GST_RemoveOutputPins(Parser);
} else