VirtualDub cannot find its codecs

Waldeck Schutzer schutzer at
Sat Jan 18 23:40:30 CST 2003


I'm not a computer geek but after some code chasing I found the reason 
why VirtualDub (and any other video compression engine, I suppose) could 
not find its video codecs. I am sending a patch that worked fine for me. 
I simply noticed the problem is in msvideo_main.c, function ICInfo, 
which is used to enumerate the installed codecs. The main loop in that 
function is going through the codecs listed in the System.ini file under 
drivers32 section. The problem is that the list returned by 
GetPrivateProfile show only the keys and not the expected key=value 
pairs. To fix that I simply removed the checking for an equal sign. 
Moreover, I noticed that it would stop enumerating at the first codec 
that failed to open. I found better to keep going down the list and just 
ignore the faulty codec, since I presume that is what Windows would do. 
Well there you are.

-------------- next part --------------
Index: wine/dlls/msvideo/msvideo_main.c
RCS file: /home/wine/wine/dlls/msvideo/msvideo_main.c,v
retrieving revision 1.45
diff -r1.45 msvideo_main.c
>     // The "Case of the missing codecs"
>     // A fix proposed by Waldeck Schutzer <waldeck at>
<             if (!strncasecmp((char*)&fccType, s, 4) && s[4] == '.' && s[9] == '=')
>             if (!strncasecmp((char*)&fccType, s, 4) && s[4] == '.' /* && s[9] == '=' */ )
>             // buf is a list of keys, not keys followed by their values!
> 			// Some bad codecs can make wine crash right here.
> 			// It would be nice to know why and to find ways
> 			// to preventing it from happening. I can't do it.
<                     return FALSE;
>                     // return FALSE;
> 		    // This one failed to open, but keep going down the list!
> 		    fccHandler++;

More information about the wine-patches mailing list