quartz: Don't delete critical sections before the filter's pins are done using them.

This commit is contained in:
Chris Robinson 2007-03-19 13:26:09 -07:00 committed by Alexandre Julliard
parent 6e5b36d4dc
commit 6bd3b156ac
4 changed files with 12 additions and 10 deletions

View File

@ -400,8 +400,6 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface)
{
IPin *pConnectedTo;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
if (This->pClock)
IReferenceClock_Release(This->pClock);
@ -425,6 +423,9 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface)
This->lpVtbl = NULL;
This->IBasicAudio_vtbl = NULL;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
TRACE("Destroying Audio Renderer\n");
CoTaskMemFree(This);

View File

@ -187,8 +187,6 @@ static ULONG WINAPI Parser_Release(IBaseFilter * iface)
{
ULONG i;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
if (This->pClock)
IReferenceClock_Release(This->pClock);
@ -208,6 +206,9 @@ static ULONG WINAPI Parser_Release(IBaseFilter * iface)
CoTaskMemFree(This->ppPins);
This->lpVtbl = NULL;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
TRACE("Destroying parser\n");
CoTaskMemFree(This);

View File

@ -276,9 +276,6 @@ static ULONG WINAPI TransformFilter_Release(IBaseFilter * iface)
{
ULONG i;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
if (This->pClock)
IReferenceClock_Release(This->pClock);
@ -301,6 +298,9 @@ static ULONG WINAPI TransformFilter_Release(IBaseFilter * iface)
This->pFuncsTable->pfnCleanup(This);
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
TRACE("Destroying transform filter\n");
CoTaskMemFree(This);

View File

@ -524,9 +524,6 @@ static ULONG WINAPI VideoRenderer_Release(IBaseFilter * iface)
{
IPin *pConnectedTo;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
DestroyWindow(This->hWnd);
PostThreadMessageA(This->ThreadID, WM_QUIT, 0, 0);
WaitForSingleObject(This->hThread, INFINITE);
@ -547,6 +544,9 @@ static ULONG WINAPI VideoRenderer_Release(IBaseFilter * iface)
CoTaskMemFree(This->ppPins);
This->lpVtbl = NULL;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
TRACE("Destroying Video Renderer\n");
CoTaskMemFree(This);