MCIAVI: Fallback to a compression scheme specified in the stream format
Dmitry Timoshkov
dmitry at baikal.ru
Mon Apr 5 07:58:03 CDT 2004
Hello,
I've got several AVI files created with "Gif Movie Gear"
(www.gamani.com/download/gmvgr26.exe) which have FOURCC
handler set to 'msvc' but 'strf' DIB header with BI_RGB
(uncompressed). This AVI files is being played just fine
under win2k. Testing under Windows showed that patching AVI
file in a hex editor and replacing 'msvc' by 'ssss' changes
nothing, AVI remains playable.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Fallback to a compression scheme specified in the stream format in
the case FOURCC handler does not exist or format is not supported.
--- cvs/hq/wine/dlls/winmm/mciavi/mmoutput.c Tue Mar 16 18:37:03 2004
+++ wine/dlls/winmm/mciavi/mmoutput.c Mon Apr 5 21:31:37 2004
@@ -426,23 +426,20 @@ BOOL MCIAVI_OpenVideo(WINE_MCIAVI* wm
wma->dwCachedFrame = -1;
- /* check for builtin DIB compressions */
- if ((fcc == mmioFOURCC('D','I','B',' ')) ||
- (fcc == mmioFOURCC('R','L','E',' ')) ||
- (fcc == BI_RGB) || (fcc == BI_RLE8) ||
- (fcc == BI_RLE4) || (fcc == BI_BITFIELDS))
- {
- wma->hic = 0;
- goto paint_frame;
- }
-
/* get the right handle */
- if (fcc == 0) fcc = wma->inbih->biCompression;
if (fcc == mmioFOURCC('C','R','A','M')) fcc = mmioFOURCC('M','S','V','C');
/* try to get a decompressor for that type */
wma->hic = ICLocate(ICTYPE_VIDEO, fcc, wma->inbih, NULL, ICMODE_DECOMPRESS);
if (!wma->hic) {
+ /* check for builtin DIB compressions */
+ fcc = wma->inbih->biCompression;
+ if ((fcc == mmioFOURCC('D','I','B',' ')) ||
+ (fcc == mmioFOURCC('R','L','E',' ')) ||
+ (fcc == BI_RGB) || (fcc == BI_RLE8) ||
+ (fcc == BI_RLE4) || (fcc == BI_BITFIELDS))
+ goto paint_frame;
+
WARN("Can't locate codec for the file\n");
return FALSE;
}
More information about the wine-patches
mailing list