mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
VIDEO: Better handle failing loading Smacker videos
This commit is contained in:
parent
724d7ef101
commit
7484ba037c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user