Bug 1159343: Interrupt seek early when possible. r=jwwang

This commit is contained in:
Jean-Yves Avenard 2015-09-24 16:46:14 +10:00
Родитель b048d19b03
Коммит 2fc3af55bd
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -932,8 +932,10 @@ MediaDecoderStateMachine::OnVideoDecoded(MediaData* aVideoSample)
// in this case, we'll just decode forward. Bug 1026330.
mCurrentSeek.mTarget.mType = SeekTarget::Accurate;
}
if (mCurrentSeek.mTarget.mType == SeekTarget::PrevSyncPoint) {
// Non-precise seek; we can stop the seek at the first sample.
if (mCurrentSeek.mTarget.mType == SeekTarget::PrevSyncPoint ||
mPendingSeek.Exists()) {
// Non-precise seek; or a pending seek exists ; we can stop the seek
// at the first sample.
Push(video, MediaData::VIDEO_DATA);
} else {
// We're doing an accurate seek. We still need to discard