Module: wine Branch: master Commit: b5619e8628ceac78e08420c87d82dc39253483eb URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5619e8628ceac78e08420c87d...
Author: Jan Zerebecki jan.wine@zerebecki.de Date: Sat Mar 10 22:10:20 2007 +0100
quartz: Add DebugInfo to critical sections.
Also add missing DeleteCriticalSection.
---
dlls/quartz/dsoundrender.c | 6 +++++- dlls/quartz/filesource.c | 5 +++++ dlls/quartz/filtergraph.c | 4 ++++ dlls/quartz/memallocator.c | 3 +++ dlls/quartz/parser.c | 3 +++ dlls/quartz/systemclock.c | 2 ++ dlls/quartz/transform.c | 3 +++ dlls/quartz/videorenderer.c | 3 +++ 8 files changed, 28 insertions(+), 1 deletions(-)
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 @@ 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,8 +398,9 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface)
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 @@ 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; 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 @@ 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); 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 @@ 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; } 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 @@ 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); 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 @@ 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); } 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 @@ 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) 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 @@ 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);