quartz: Add DebugInfo to critical sections.
Also add missing DeleteCriticalSection.
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c
index 7db6765..bdb6079 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -316,11 +316,13 @@
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 @@
else
{
CoTaskMemFree(pDSoundRender->ppPins);
+ pDSoundRender->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&pDSoundRender->csFilter);
CoTaskMemFree(pDSoundRender);
}
@@ -395,8 +398,9 @@
if (!refCount)
{
+ This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
- if (This->pClock)
+ if (This->pClock)
IReferenceClock_Release(This->pClock);
if (This->dsbuffer)
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index 66a753f..22209f5 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -314,6 +314,7 @@
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 @@
{
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 @@
}
CloseHandle(This->hFile);
CloseHandle(This->hEvent);
+ This->csList.DebugInfo->Spare[0] = 0;
+ DeleteCriticalSection(&This->csList);
CoTaskMemFree(This);
return 0;
}
@@ -862,6 +866,7 @@
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;
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 4bbe879..724feda 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -76,6 +76,7 @@
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 @@
{
CloseHandle(omr->msg_event);
CoTaskMemFree(omr->messages);
+ omr->msg_crst.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&omr->msg_crst);
return TRUE;
}
@@ -268,6 +270,7 @@
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 @@
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);
diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c
index 4bb6bab..d36b83c 100644
--- a/dlls/quartz/memallocator.c
+++ b/dlls/quartz/memallocator.c
@@ -105,6 +105,7 @@
pMemAlloc->lWaiting = 0;
InitializeCriticalSection(&pMemAlloc->csState);
+ pMemAlloc->csState.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BaseMemAllocator.csState");
return S_OK;
}
@@ -155,6 +156,8 @@
if (This->bCommitted)
This->fnFree(iface);
CoTaskMemFree(This->pProps);
+ This->csState.DebugInfo->Spare[0] = 0;
+ DeleteCriticalSection(&This->csState);
CoTaskMemFree(This);
return 0;
}
diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c
index e9d0854..1da0b6d 100644
--- a/dlls/quartz/parser.c
+++ b/dlls/quartz/parser.c
@@ -71,6 +71,7 @@
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 @@
else
{
CoTaskMemFree(pParser->ppPins);
+ pParser->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&pParser->csFilter);
CoTaskMemFree(pParser);
}
@@ -185,6 +187,7 @@
{
ULONG i;
+ This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
if (This->pClock)
IReferenceClock_Release(This->pClock);
diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c
index 78374d8..d78611f 100644
--- a/dlls/quartz/systemclock.c
+++ b/dlls/quartz/systemclock.c
@@ -224,6 +224,7 @@
WaitForSingleObject(This->adviseThread, INFINITE);
CloseHandle(This->adviseThread);
}
+ This->safe.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->safe);
CoTaskMemFree(This);
}
@@ -384,6 +385,7 @@
obj->lastTimeTickCount = GetTickCount();
InitializeCriticalSection(&obj->safe);
+ obj->safe.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SystemClockImpl.safe");
return SystemClockImpl_QueryInterface((IReferenceClock*) obj, &IID_IReferenceClock, ppv);
}
diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c
index a610d43..22cb2bf 100644
--- a/dlls/quartz/transform.c
+++ b/dlls/quartz/transform.c
@@ -187,6 +187,7 @@
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 @@
else
{
CoTaskMemFree(pTransformFilter->ppPins);
+ pTransformFilter->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&pTransformFilter->csFilter);
CoTaskMemFree(pTransformFilter);
}
@@ -274,6 +276,7 @@
{
ULONG i;
+ This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
if (This->pClock)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index 3ec283a..695258d 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -437,6 +437,7 @@
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 @@
else
{
CoTaskMemFree(pVideoRenderer->ppPins);
+ pVideoRenderer->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&pVideoRenderer->csFilter);
CoTaskMemFree(pVideoRenderer);
}
@@ -520,6 +522,7 @@
if (!refCount)
{
+ This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
DestroyWindow(This->hWnd);