[Scummvm-cvs-logs] scummvm master -> 7484ba037cc75201e6cdae0374e9cd6baa1922a4
clone2727
clone2727 at gmail.com
Tue Jul 19 15:45:56 CEST 2011
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:
7484ba037c VIDEO: Better handle failing loading Smacker videos
Commit: 7484ba037cc75201e6cdae0374e9cd6baa1922a4
https://github.com/scummvm/scummvm/commit/7484ba037cc75201e6cdae0374e9cd6baa1922a4
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-07-19T06:41:31-07:00
Commit Message:
VIDEO: Better handle failing loading Smacker videos
Changed paths:
video/smk_decoder.cpp
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index c4c3721..adb8fad 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -372,9 +372,11 @@ bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) {
_fileStream = stream;
- // Seek to the first frame
+ // Read in the Smacker header
_header.signature = _fileStream->readUint32BE();
- assert(_header.signature == MKTAG('S','M','K','2') || _header.signature == MKTAG('S','M','K','4'));
+
+ if (_header.signature != MKTAG('S', 'M', 'K', '2') && _header.signature == MKTAG('S', 'M', 'K', '4'))
+ return false;
uint32 width = _fileStream->readUint32LE();
uint32 height = _fileStream->readUint32LE();
More information about the Scummvm-git-logs
mailing list