VIDEO: Fix seeking in AVI videos with no initial audio frames

This commit is contained in:
Matthew Hoops 2014-09-28 15:10:04 -04:00
parent 690c6cc8d4
commit b2676c412d

View File

@ -528,7 +528,10 @@ bool AVIDecoder::seekIntern(const Audio::Timestamp &time) {
// Recreate the audio stream
audioTrack->resetStream();
uint framesNeeded = _header.initialFrames;
uint framesNeeded = _header.initialFrames;
if (framesNeeded == 0)
framesNeeded = 1;
uint startAudioChunk = 0;
int startAudioSearch = (lastRecord < 0) ? (frameIndex - 1) : (lastRecord - 1);