Handle avi files with non standard video stream names.

This commit is contained in:
Christian Costa 2004-03-16 01:14:39 +00:00 committed by Alexandre Julliard
parent c2adec0c70
commit e55a4b634b
1 changed files with 13 additions and 1 deletions

View File

@ -166,6 +166,7 @@ static BOOL MCIAVI_AddFrame(WINE_MCIAVI* wma, LPMMCKINFO mmck,
{
const BYTE *p;
DWORD stream_n;
DWORD twocc;
if (mmck->ckid == ckidAVIPADDING) return TRUE;
@ -183,7 +184,18 @@ static BOOL MCIAVI_AddFrame(WINE_MCIAVI* wma, LPMMCKINFO mmck,
TRACE("ckid %4.4s (stream #%ld)\n", (LPSTR)&mmck->ckid, stream_n);
switch (TWOCCFromFOURCC(mmck->ckid)) {
/* Some (rare?) AVI files have video streams name XXYY where XX = stream number and YY = TWOCC
* of the last 2 characters of the biCompression member of the BITMAPINFOHEADER structure.
* Ex: fccHandler = IV32 & biCompression = IV32 => stream name = XX32
* fccHandler = MSVC & biCompression = CRAM => stream name = XXAM
* Another possibility is that these TWOCC are simply ignored.
* Default to cktypeDIBcompressed when this case happens.
*/
twocc = TWOCCFromFOURCC(mmck->ckid);
if (twocc == TWOCCFromFOURCC(wma->inbih->biCompression))
twocc = cktypeDIBcompressed;
switch (twocc) {
case cktypeDIBbits:
case cktypeDIBcompressed:
case cktypePALchange: