зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1278228 - handle VideoOnly seek as an accurate seek; r=jwwang
MozReview-Commit-ID: DsQQB8YX2jm --HG-- extra : transplant_source : F%A5%29%94%9B/%3C%00p%BA%2Cp%07%BC%E3%DA%16%0A%3Fd
This commit is contained in:
Родитель
a31a51a625
Коммит
634475c80e
|
@ -1167,6 +1167,13 @@ MediaDecoderStateMachine::SetDormant(bool aDormant)
|
|||
if (mQueuedSeek.Exists()) {
|
||||
// Keep latest seek target
|
||||
} else if (mSeekTask && mSeekTask->Exists()) {
|
||||
// Because both audio and video decoders are going to be reset in this
|
||||
// method later, we treat a VideoOnly seek task as a normal Accurate
|
||||
// seek task so that while it is resumed, both audio and video playback
|
||||
// are handled.
|
||||
if (mSeekTask->GetSeekJob().mTarget.IsVideoOnly()) {
|
||||
mSeekTask->GetSeekJob().mTarget.SetType(SeekTarget::Accurate);
|
||||
}
|
||||
mQueuedSeek = Move(mSeekTask->GetSeekJob());
|
||||
mSeekTaskRequest.DisconnectIfExists();
|
||||
} else {
|
||||
|
@ -1644,9 +1651,6 @@ MediaDecoderStateMachine::InitiateSeek(SeekJob aSeekJob)
|
|||
Move(aSeekJob), mInfo, Duration(),
|
||||
GetMediaTime(), AudioQueue(), VideoQueue());
|
||||
} else {
|
||||
// Use MOZ_DIAGNOSTIC_ASSERT here to test if a "VideoOnly" seek task could
|
||||
// reach here, may come from a dormant state. Once we confirm it, we could
|
||||
// than handle it.
|
||||
MOZ_DIAGNOSTIC_ASSERT(false, "Cannot handle this seek task.");
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче