msvideo

Eric Pouech eric.pouech at wanadoo.fr
Thu Jan 2 09:06:34 CST 2003


Stephen Mollett reported some regression in msvideo code.
This patch should fix them (at least some of them)

A+
-- 
Eric Pouech
-------------- next part --------------
Name:          msvideo_dd
ChangeLog:     fixed some nasty bugs in drawdib creation/deletion
License:       X11
GenDate:       2003/01/02 14:27:45 UTC
ModifiedFiles: dlls/msvideo/drawdib.c
AddedFiles:    
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/msvideo/drawdib.c,v
retrieving revision 1.19
diff -u -u -r1.19 drawdib.c
--- dlls/msvideo/drawdib.c	15 Dec 2002 01:14:21 -0000	1.19
+++ dlls/msvideo/drawdib.c	30 Dec 2002 14:30:51 -0000
@@ -64,7 +64,7 @@
 {
     WINE_HDD*   hdd;
 
-    for (hdd = HDD_FirstHdd; hdd != NULL && hdd->hSelf != hdd; hdd = hdd->next);
+    for (hdd = HDD_FirstHdd; hdd != NULL && hdd->hSelf != hd; hdd = hdd->next);
     return hdd;
 }
 
@@ -97,12 +97,22 @@
 BOOL VFWAPI DrawDibClose(HDRAWDIB hdd) 
 {
     WINE_HDD* whdd = MSVIDEO_GetHddPtr(hdd);
+    WINE_HDD** p;
 
     TRACE("(%p)\n", hdd);
 
     if (!whdd) return FALSE;
 
     if (whdd->begun) DrawDibEnd(hdd);
+
+    for (p = &HDD_FirstHdd; *p != NULL; p = &((*p)->next))
+    {
+        if (*p == whdd)
+        {
+            *p = whdd->next;
+            break;
+        }
+    }
 
     HeapFree(GetProcessHeap(), 0, whdd);
 


More information about the wine-patches mailing list