Fallback to a compression scheme specified in the stream format in the
case FOURCC handler does not exist or format is not supported.
This commit is contained in:
parent
65c7aa9947
commit
f560c71c29
|
@ -426,23 +426,20 @@ BOOL MCIAVI_OpenVideo(WINE_MCIAVI* wma)
|
||||||
|
|
||||||
wma->dwCachedFrame = -1;
|
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 */
|
/* get the right handle */
|
||||||
if (fcc == 0) fcc = wma->inbih->biCompression;
|
|
||||||
if (fcc == mmioFOURCC('C','R','A','M')) fcc = mmioFOURCC('M','S','V','C');
|
if (fcc == mmioFOURCC('C','R','A','M')) fcc = mmioFOURCC('M','S','V','C');
|
||||||
|
|
||||||
/* try to get a decompressor for that type */
|
/* try to get a decompressor for that type */
|
||||||
wma->hic = ICLocate(ICTYPE_VIDEO, fcc, wma->inbih, NULL, ICMODE_DECOMPRESS);
|
wma->hic = ICLocate(ICTYPE_VIDEO, fcc, wma->inbih, NULL, ICMODE_DECOMPRESS);
|
||||||
if (!wma->hic) {
|
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");
|
WARN("Can't locate codec for the file\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue