quartz: Force disconnect when a filter is fully released.
This commit is contained in:
parent
559d541cf8
commit
809f68420f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue