[QUARTZ] Some bug fixes

Christian Costa titan.costa at wanadoo.fr
Fri Aug 13 08:09:46 CDT 2004


Hi,

This is the first of a serie of patches that implement an audio (dsound) 
& video (ddraw) renderers, a decoder (a VFW wrapper filter) and the 
IGraphBuilder interface.
Actually I can do a playback of a MSVC/CRAM avi file with a winetest app 
but the code is very ugly (especially the IGraphBuilder interface which 
is somewhat harcoded) and I need to clean it a bit.

Bye,

Changelog:
Added missing initialization of the filesource output pin critical section.
Avoid indefinite wait when calling GetOverlappedResult.
Fixed initial refcount of the IMemAllocator object.
Improved some traces.

Christian Costa   titan.costa at wanadoo.fr

-------------- next part --------------
Index: filesource.c
===================================================================
RCS file: /home/wine/wine/dlls/quartz/filesource.c,v
retrieving revision 1.5
diff -u -r1.5 filesource.c
--- filesource.c	20 Apr 2004 01:12:17 -0000	1.5
+++ filesource.c	13 Aug 2004 11:51:29 -0000
@@ -882,6 +882,7 @@
         pPinImpl->hEvent = CreateEventW(NULL, 0, 0, NULL);
         pPinImpl->bFlushing = FALSE;
         pPinImpl->pHead = NULL;
+        InitializeCriticalSection(&pPinImpl->csList);
 
         *ppPin = (IPin *)(&pPinImpl->pin.pin.lpVtbl);
         return S_OK;
@@ -1092,7 +1093,7 @@
     {
         DWORD dwBytes;
         /* get any errors */
-        if (!GetOverlappedResult(This->hFile, &pDataRq->ovl, &dwBytes, TRUE))
+        if (!GetOverlappedResult(This->hFile, &pDataRq->ovl, &dwBytes, FALSE))
             hr = HRESULT_FROM_WIN32(GetLastError());
     }
 
Index: memallocator.c
===================================================================
RCS file: /home/wine/wine/dlls/quartz/memallocator.c,v
retrieving revision 1.1
diff -u -r1.1 memallocator.c
--- memallocator.c	11 Sep 2003 21:18:36 -0000	1.1
+++ memallocator.c	13 Aug 2004 11:51:31 -0000
@@ -97,7 +97,7 @@
 
     pMemAlloc->lpVtbl = &BaseMemAllocator_VTable;
 
-    pMemAlloc->ref = 0;
+    pMemAlloc->ref = 1;
     pMemAlloc->pProps = NULL;
     list_init(&pMemAlloc->free_list);
     list_init(&pMemAlloc->used_list);
@@ -474,7 +474,7 @@
 {
     ICOM_THIS(StdMediaSample2, iface);
 
-    TRACE("()\n");
+    TRACE("(%p)->() AddRef from %ld\n", iface, This->ref);
 
     return InterlockedIncrement(&This->ref);
 }
@@ -483,7 +483,7 @@
 {
     ICOM_THIS(StdMediaSample2, iface);
 
-    TRACE("()\n");
+    TRACE("(%p)->() Release from %ld\n", iface, This->ref);
 
     if (!InterlockedDecrement(&This->ref))
     {


More information about the wine-patches mailing list