[Scummvm-cvs-logs] scummvm master -> 0d6f6119638ae40a6e849a740452c67919eeb559

clone2727 clone2727 at gmail.com
Sat Aug 17 03:20:35 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0d6f611963 VIDEO: Ignore some AVI lists with metadata


Commit: 0d6f6119638ae40a6e849a740452c67919eeb559
    https://github.com/scummvm/scummvm/commit/0d6f6119638ae40a6e849a740452c67919eeb559
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2013-08-16T18:17:51-07:00

Commit Message:
VIDEO: Ignore some AVI lists with metadata

Changed paths:
    video/avi_decoder.cpp



diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 92a60fc..34bc8c4 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -65,9 +65,10 @@ namespace Video {
 #define ID_VEDT MKTAG('v','e','d','t')
 #define ID_IDX1 MKTAG('i','d','x','1')
 #define ID_STRD MKTAG('s','t','r','d')
-//#define ID_INFO MKTAG('I','N','F','O')
+#define ID_INFO MKTAG('I','N','F','O')
 #define ID_ISFT MKTAG('I','S','F','T')
 #define ID_DISP MKTAG('D','I','S','P')
+#define ID_PRMI MKTAG('P','R','M','I')
 
 // Codec tags
 #define ID_RLE  MKTAG('R','L','E',' ')
@@ -170,15 +171,25 @@ void AVIDecoder::handleList(uint32 listSize) {
 
 	debug(0, "Found LIST of type %s", tag2str(listType));
 
-	if (listType == ID_MOVI) {
-		// If we found the movie block
+	switch (listType) {
+	case ID_MOVI: // Movie List
+		// We found the movie block
 		_foundMovieList = true;
 		_movieListStart = curPos;
 		_fileStream->skip(listSize);
 		return;
-	} else if (listType == ID_HDRL) {
+	case ID_HDRL: // Header List
 		// Mark the header as decoded
 		_decodedHeader = true;
+		break;
+	case ID_INFO: // Metadata
+	case ID_PRMI: // Unknown metadata, should be safe to ignore
+		// Ignore metadata
+		_fileStream->skip(listSize);
+		return;
+	case ID_STRL: // Stream list
+	default:      // (Just hope we can parse it!)
+		break;
 	}
 
 	while ((_fileStream->pos() - curPos) < listSize)






More information about the Scummvm-git-logs mailing list