Commit 38586dcf authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

winegstreamer: Fix reference leaks.

parent 17586e30
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment