Bug 1269408: P7. Start skip to next keyframe logic when resume point is behind current time. r=gerald

There is no point decoding up to the internal seek time if it's already behind the current playback time.

MozReview-Commit-ID: ErPrjEPFCOH
This commit is contained in:
Jean-Yves Avenard 2016-05-06 15:54:49 +10:00
Родитель ffcc71c256
Коммит 85dfb74665
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -489,7 +489,10 @@ MediaFormatReader::ShouldSkip(bool aSkipToNextKeyframe, media::TimeUnit aTimeThr
if (NS_FAILED(rv)) {
return aSkipToNextKeyframe;
}
return nextKeyframe < aTimeThreshold && nextKeyframe.ToMicroseconds() >= 0;
return (nextKeyframe < aTimeThreshold ||
(mVideo.mTimeThreshold &&
mVideo.mTimeThreshold.ref().mTime < aTimeThreshold)) &&
nextKeyframe.ToMicroseconds() >= 0;
}
RefPtr<MediaDecoderReader::MediaDataPromise>