Jörg Höhle : msvfw32: Force lower-case 'vidc/vids /audc' etc. when opening new driver.

Alexandre Julliard julliard at winehq.org
Tue May 24 12:53:52 CDT 2011


Module: wine
Branch: master
Commit: 0e566c5b645572d6ce17cc05a1e815a93838a7f3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0e566c5b645572d6ce17cc05a1e815a93838a7f3

Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date:   Tue Apr 19 07:18:23 2011 +0200

msvfw32: Force lower-case 'vidc/vids/audc' etc. when opening new driver.

---

 dlls/msvfw32/msvideo_main.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/dlls/msvfw32/msvideo_main.c b/dlls/msvfw32/msvideo_main.c
index c5b404d..f27d3ec 100644
--- a/dlls/msvfw32/msvideo_main.c
+++ b/dlls/msvfw32/msvideo_main.c
@@ -403,9 +403,11 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
     driver = reg_driver_list;
     while(driver)
         if (!compare_fourcc(fccType, driver->fccType) &&
-            !compare_fourcc(fccHandler, driver->fccHandler))
+            !compare_fourcc(fccHandler, driver->fccHandler)) {
+	    fccType = driver->fccType;
+	    fccHandler = driver->fccHandler;
 	    break;
-        else
+        } else
             driver = driver->next;
 
     if (driver && driver->proc)
@@ -426,7 +428,13 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
     icopen.dnDevNode            = 0; /* FIXME */
 	
     if (!driver) {
-        /* The driver is registered in the registry */
+        /* normalize to lower case as in 'vidc' */
+        ((char*)&fccType)[0] = tolower(((char*)&fccType)[0]);
+        ((char*)&fccType)[1] = tolower(((char*)&fccType)[1]);
+        ((char*)&fccType)[2] = tolower(((char*)&fccType)[2]);
+        ((char*)&fccType)[3] = tolower(((char*)&fccType)[3]);
+        icopen.fccType = fccType;
+        /* Seek the driver in the registry */
 	fourcc_to_string(codecname, fccType);
         codecname[4] = '.';
 	fourcc_to_string(codecname + 5, fccHandler);




More information about the wine-cvs mailing list