VIDEO: Ensure the sample to chunk index remains valid
This commit is contained in:
parent
3f0c9e0910
commit
842b471e45
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue