diff options
-rw-r--r-- | video/avi_decoder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 52a55f600c..8f1bec4388 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -296,7 +296,7 @@ bool AVIDecoder::loadStream(Common::SeekableReadStream *stream) { return false; } - /* uint32 fileSize = */ stream->readUint32LE(); + uint32 fileSize = stream->readUint32LE(); uint32 riffType = stream->readUint32BE(); if (riffType != ID_AVI) { @@ -307,7 +307,7 @@ bool AVIDecoder::loadStream(Common::SeekableReadStream *stream) { _fileStream = stream; // Go through all chunks in the file - while (parseNextChunk()) + while (_fileStream->pos() < fileSize && parseNextChunk()) ; if (!_decodedHeader) { |