Commit 809f6842 authored by Chris Robinson's avatar Chris Robinson Committed by Alexandre Julliard

quartz: Force disconnect when a filter is fully released.

parent 559d541c
......@@ -398,6 +398,8 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface)
if (!refCount)
{
IPin *pConnectedTo;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
if (This->pClock)
......@@ -410,6 +412,13 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface)
IDirectSound_Release(This->dsound);
This->dsound = NULL;
if (SUCCEEDED(IPin_ConnectedTo(This->ppPins[0], &pConnectedTo)))
{
IPin_Disconnect(pConnectedTo);
IPin_Release(pConnectedTo);
}
IPin_Disconnect(This->ppPins[0]);
IPin_Release(This->ppPins[0]);
CoTaskMemFree(This->ppPins);
......
......@@ -193,7 +193,18 @@ static ULONG WINAPI Parser_Release(IBaseFilter * iface)
IReferenceClock_Release(This->pClock);
for (i = 0; i < This->cStreams + 1; i++)
{
IPin *pConnectedTo;
if (SUCCEEDED(IPin_ConnectedTo(This->ppPins[i], &pConnectedTo)))
{
IPin_Disconnect(pConnectedTo);
IPin_Release(pConnectedTo);
}
IPin_Disconnect(This->ppPins[i]);
IPin_Release(This->ppPins[i]);
}
CoTaskMemFree(This->ppPins);
This->lpVtbl = NULL;
......
......@@ -283,7 +283,18 @@ static ULONG WINAPI TransformFilter_Release(IBaseFilter * iface)
IReferenceClock_Release(This->pClock);
for (i = 0; i < 2; i++)
{
IPin *pConnectedTo;
if (SUCCEEDED(IPin_ConnectedTo(This->ppPins[i], &pConnectedTo)))
{
IPin_Disconnect(pConnectedTo);
IPin_Release(pConnectedTo);
}
IPin_Disconnect(This->ppPins[i]);
IPin_Release(This->ppPins[i]);
}
CoTaskMemFree(This->ppPins);
This->lpVtbl = NULL;
......
......@@ -522,6 +522,8 @@ static ULONG WINAPI VideoRenderer_Release(IBaseFilter * iface)
if (!refCount)
{
IPin *pConnectedTo;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
......@@ -533,6 +535,13 @@ static ULONG WINAPI VideoRenderer_Release(IBaseFilter * iface)
if (This->pClock)
IReferenceClock_Release(This->pClock);
if (SUCCEEDED(IPin_ConnectedTo(This->ppPins[0], &pConnectedTo)))
{
IPin_Disconnect(pConnectedTo);
IPin_Release(pConnectedTo);
}
IPin_Disconnect(This->ppPins[0]);
IPin_Release(This->ppPins[0]);
CoTaskMemFree(This->ppPins);
......
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