diff options
author | Matthew Hoops | 2011-10-07 14:18:08 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-10-07 14:18:08 -0400 |
commit | 842b471e45ae8b7c1b4516b9bd5bf39d61112077 (patch) | |
tree | a6fca7677be6fcf393422dfb1f5ab4222954532d /video | |
parent | 3f0c9e0910e7bf7b6cd0ebb217167a6a4ce7ec31 (diff) | |
download | scummvm-rg350-842b471e45ae8b7c1b4516b9bd5bf39d61112077.tar.gz scummvm-rg350-842b471e45ae8b7c1b4516b9bd5bf39d61112077.tar.bz2 scummvm-rg350-842b471e45ae8b7c1b4516b9bd5bf39d61112077.zip |
VIDEO: Ensure the sample to chunk index remains valid
Diffstat (limited to 'video')
-rw-r--r-- | video/qt_decoder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 389acea86b..74bf533e62 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -486,7 +486,7 @@ Common::SeekableReadStream *QuickTimeDecoder::getNextFramePacket(uint32 &descId) uint32 sampleToChunkIndex = 0; for (uint32 i = 0; i < _tracks[_videoTrackIndex]->chunkCount; i++) { - if (i >= _tracks[_videoTrackIndex]->sampleToChunk[sampleToChunkIndex].first) + if (sampleToChunkIndex < _tracks[_videoTrackIndex]->sampleToChunkCount && i >= _tracks[_videoTrackIndex]->sampleToChunk[sampleToChunkIndex].first) sampleToChunkIndex++; totalSampleCount += _tracks[_videoTrackIndex]->sampleToChunk[sampleToChunkIndex - 1].count; |