Commit b5619e86 authored by Jan Zerebecki's avatar Jan Zerebecki Committed by Alexandre Julliard

quartz: Add DebugInfo to critical sections.

Also add missing DeleteCriticalSection.
parent 614ee831
......@@ -316,11 +316,13 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv)
pDSoundRender->IBasicAudio_vtbl = &IBasicAudio_Vtbl;
pDSoundRender->refCount = 1;
InitializeCriticalSection(&pDSoundRender->csFilter);
pDSoundRender->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": DSoundRenderImpl.csFilter");
pDSoundRender->state = State_Stopped;
pDSoundRender->ppPins = CoTaskMemAlloc(1 * sizeof(IPin *));
if (!pDSoundRender->ppPins)
{
pDSoundRender->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&pDSoundRender->csFilter);
CoTaskMemFree(pDSoundRender);
return E_OUTOFMEMORY;
......@@ -340,6 +342,7 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv)
else
{
CoTaskMemFree(pDSoundRender->ppPins);
pDSoundRender->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&pDSoundRender->csFilter);
CoTaskMemFree(pDSoundRender);
}
......@@ -395,6 +398,7 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface)
if (!refCount)
{
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
if (This->pClock)
IReferenceClock_Release(This->pClock);
......
......@@ -314,6 +314,7 @@ HRESULT AsyncReader_create(IUnknown * pUnkOuter, LPVOID * ppv)
pAsyncRead->pOutputPin = NULL;
InitializeCriticalSection(&pAsyncRead->csFilter);
pAsyncRead->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": AsyncReader.csFilter");
pAsyncRead->pszFileName = NULL;
pAsyncRead->pmt = NULL;
......@@ -378,6 +379,7 @@ static ULONG WINAPI AsyncReader_Release(IBaseFilter * iface)
{
if (This->pOutputPin)
IPin_Release(This->pOutputPin);
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
This->lpVtbl = NULL;
CoTaskMemFree(This);
......@@ -764,6 +766,8 @@ static ULONG WINAPI FileAsyncReaderPin_Release(IPin * iface)
}
CloseHandle(This->hFile);
CloseHandle(This->hEvent);
This->csList.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csList);
CoTaskMemFree(This);
return 0;
}
......@@ -862,6 +866,7 @@ static HRESULT FileAsyncReader_Construct(HANDLE hFile, IBaseFilter * pBaseFilter
pPinImpl->pHead = NULL;
pPinImpl->pin.pConnectSpecific = FileAsyncReaderPin_ConnectSpecific;
InitializeCriticalSection(&pPinImpl->csList);
pPinImpl->csList.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": FileAsyncReader.csList");
*ppPin = (IPin *)(&pPinImpl->pin.pin.lpVtbl);
return S_OK;
......
......@@ -76,6 +76,7 @@ static int EventsQueue_Init(EventsQueue* omr)
ZeroMemory(omr->messages, omr->ring_buffer_size * sizeof(Event));
InitializeCriticalSection(&omr->msg_crst);
omr->msg_crst.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": EventsQueue.msg_crst");
return TRUE;
}
......@@ -83,6 +84,7 @@ static int EventsQueue_Destroy(EventsQueue* omr)
{
CloseHandle(omr->msg_event);
CoTaskMemFree(omr->messages);
omr->msg_crst.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&omr->msg_crst);
return TRUE;
}
......@@ -268,6 +270,7 @@ static ULONG Filtergraph_Release(IFilterGraphImpl *This) {
IFilterMapper2_Release(This->pFilterMapper2);
CloseHandle(This->hEventCompletion);
EventsQueue_Destroy(&This->evqueue);
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs);
CoTaskMemFree(This->ppFiltersInGraph);
CoTaskMemFree(This->pFilterNames);
......@@ -4516,6 +4519,7 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj)
fimpl->state = State_Stopped;
EventsQueue_Init(&fimpl->evqueue);
InitializeCriticalSection(&fimpl->cs);
fimpl->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IFilterGraphImpl.cs");
fimpl->nItfCacheEntries = 0;
hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&fimpl->pFilterMapper2);
......
......@@ -105,6 +105,7 @@ static HRESULT BaseMemAllocator_Init(HRESULT (* fnAlloc)(IMemAllocator *), HRESU
pMemAlloc->lWaiting = 0;
InitializeCriticalSection(&pMemAlloc->csState);
pMemAlloc->csState.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BaseMemAllocator.csState");
return S_OK;
}
......@@ -155,6 +156,8 @@ static ULONG WINAPI BaseMemAllocator_Release(IMemAllocator * iface)
if (This->bCommitted)
This->fnFree(iface);
CoTaskMemFree(This->pProps);
This->csState.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csState);
CoTaskMemFree(This);
return 0;
}
......
......@@ -71,6 +71,7 @@ HRESULT Parser_Create(ParserImpl* pParser, const CLSID* pClsid, PFN_PROCESS_SAMP
pParser->lpVtbl = &Parser_Vtbl;
pParser->refCount = 1;
InitializeCriticalSection(&pParser->csFilter);
pParser->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ParserImpl.csFilter");
pParser->state = State_Stopped;
pParser->pClock = NULL;
ZeroMemory(&pParser->filterInfo, sizeof(FILTER_INFO));
......@@ -93,6 +94,7 @@ HRESULT Parser_Create(ParserImpl* pParser, const CLSID* pClsid, PFN_PROCESS_SAMP
else
{
CoTaskMemFree(pParser->ppPins);
pParser->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&pParser->csFilter);
CoTaskMemFree(pParser);
}
......@@ -185,6 +187,7 @@ 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);
......
......@@ -224,6 +224,7 @@ static ULONG WINAPI SystemClockImpl_Release(IReferenceClock* iface) {
WaitForSingleObject(This->adviseThread, INFINITE);
CloseHandle(This->adviseThread);
}
This->safe.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->safe);
CoTaskMemFree(This);
}
......@@ -384,6 +385,7 @@ HRESULT QUARTZ_CreateSystemClock(IUnknown * pUnkOuter, LPVOID * ppv) {
obj->lastTimeTickCount = GetTickCount();
InitializeCriticalSection(&obj->safe);
obj->safe.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SystemClockImpl.safe");
return SystemClockImpl_QueryInterface((IReferenceClock*) obj, &IID_IReferenceClock, ppv);
}
......@@ -187,6 +187,7 @@ HRESULT TransformFilter_Create(TransformFilterImpl* pTransformFilter, const CLSI
pTransformFilter->refCount = 1;
InitializeCriticalSection(&pTransformFilter->csFilter);
pTransformFilter->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": TransformFilterImpl.csFilter");
pTransformFilter->state = State_Stopped;
pTransformFilter->pClock = NULL;
ZeroMemory(&pTransformFilter->filterInfo, sizeof(FILTER_INFO));
......@@ -219,6 +220,7 @@ HRESULT TransformFilter_Create(TransformFilterImpl* pTransformFilter, const CLSI
else
{
CoTaskMemFree(pTransformFilter->ppPins);
pTransformFilter->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&pTransformFilter->csFilter);
CoTaskMemFree(pTransformFilter);
}
......@@ -274,6 +276,7 @@ static ULONG WINAPI TransformFilter_Release(IBaseFilter * iface)
{
ULONG i;
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
if (This->pClock)
......
......@@ -437,6 +437,7 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
pVideoRenderer->refCount = 1;
InitializeCriticalSection(&pVideoRenderer->csFilter);
pVideoRenderer->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": VideoRendererImpl.csFilter");
pVideoRenderer->state = State_Stopped;
pVideoRenderer->pClock = NULL;
pVideoRenderer->init = 0;
......@@ -460,6 +461,7 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
else
{
CoTaskMemFree(pVideoRenderer->ppPins);
pVideoRenderer->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&pVideoRenderer->csFilter);
CoTaskMemFree(pVideoRenderer);
}
......@@ -520,6 +522,7 @@ static ULONG WINAPI VideoRenderer_Release(IBaseFilter * iface)
if (!refCount)
{
This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
DestroyWindow(This->hWnd);
......
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