quartz: Fully disconnect the AsyncReader when released.

This commit is contained in:
Chris Robinson 2007-03-19 13:28:32 -07:00 committed by Alexandre Julliard
parent 1f03896e00
commit 3487da71ce
1 changed files with 9 additions and 0 deletions

View File

@ -378,7 +378,16 @@ static ULONG WINAPI AsyncReader_Release(IBaseFilter * iface)
if (!refCount) if (!refCount)
{ {
if (This->pOutputPin) if (This->pOutputPin)
{
IPin *pConnectedTo;
if(SUCCEEDED(IPin_ConnectedTo(This->pOutputPin, &pConnectedTo)))
{
IPin_Disconnect(pConnectedTo);
IPin_Release(pConnectedTo);
}
IPin_Disconnect(This->pOutputPin);
IPin_Release(This->pOutputPin); IPin_Release(This->pOutputPin);
}
This->csFilter.DebugInfo->Spare[0] = 0; This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter); DeleteCriticalSection(&This->csFilter);
This->lpVtbl = NULL; This->lpVtbl = NULL;