qcap: Add DebugInfo to critical sections.
Jan Zerebecki
jan.wine at zerebecki.de
Sat Mar 10 15:10:09 CST 2007
---
If this patch is rejected from inclusion, please tell me why, as
I would have to ask anyway.
dlls/qcap/capturegraph.c | 2 ++
dlls/qcap/v4l.c | 2 ++
dlls/qcap/vfwcapture.c | 2 ++
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/qcap/capturegraph.c b/dlls/qcap/capturegraph.c
index 3211790..34684e8 100644
--- a/dlls/qcap/capturegraph.c
+++ b/dlls/qcap/capturegraph.c
@@ -105,6 +105,7 @@ IUnknown * CALLBACK QCAP_createCaptureGraphBuilder2(IUnknown *pUnkOuter,
pCapture->ref = 1;
pCapture->mygraph = NULL;
InitializeCriticalSection(&pCapture->csFilter);
+ pCapture->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": CaptureGraphImpl*->csFilter");
*phr = S_OK;
ObjectRefCount(TRUE);
}
@@ -160,6 +161,7 @@ fnCaptureGraphBuilder2_Release(ICaptureGraphBuilder2 * iface)
if (!ref)
{
FIXME("Release IGraphFilter or w/e\n");
+ This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
This->lpVtbl = NULL;
This->lpVtbl2 = NULL;
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index bb8dfb9..88de913 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -224,6 +224,7 @@ HRESULT qcap_driver_destroy(Capture *capBox)
if( capBox->fd != -1 )
close(capBox->fd);
+ capBox->CritSect.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&capBox->CritSect);
CoTaskMemFree(capBox);
return S_OK;
@@ -789,6 +790,7 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card )
/* capBox->vtbl = &defboxVtbl; */
InitializeCriticalSection( &capBox->CritSect );
+ capBox->CritSect.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": Capture*->CritSect");
sprintf(device, "/dev/video%i", card);
TRACE("opening %s\n", device);
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c
index ace2b55..87632f5 100644
--- a/dlls/qcap/vfwcapture.c
+++ b/dlls/qcap/vfwcapture.c
@@ -112,6 +112,7 @@ IUnknown * WINAPI QCAP_createVFWCaptureFilter(IUnknown *pUnkOuter, HRESULT *phr)
pVfwCapture->state = State_Stopped;
pVfwCapture->init = FALSE;
InitializeCriticalSection(&pVfwCapture->csFilter);
+ pVfwCapture->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": VfwCapture*->csFilter");
hr = VfwPin_Construct((IBaseFilter *)&pVfwCapture->lpVtbl,
&pVfwCapture->csFilter, &pVfwCapture->pOutputPin);
if (!SUCCEEDED(hr))
@@ -208,6 +209,7 @@ static ULONG WINAPI VfwCapture_Release(IBaseFilter * iface)
IPin_Disconnect(This->pOutputPin);
}
IPin_Release(This->pOutputPin);
+ This->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csFilter);
This->lpVtbl = NULL;
CoTaskMemFree(This);
More information about the wine-patches
mailing list