зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1171311: P9. Only allow seeking if we have target time. r=cpearce
--HG-- extra : rebase_source : 0db1c344e4adf82282045268544343e508aaef5b
This commit is contained in:
Родитель
d55f87961c
Коммит
4b7429a4cd
|
@ -310,6 +310,11 @@ MediaSourceTrackDemuxer::BreakCycles()
|
|||
nsRefPtr<MediaSourceTrackDemuxer::SeekPromise>
|
||||
MediaSourceTrackDemuxer::DoSeek(media::TimeUnit aTime)
|
||||
{
|
||||
if (aTime.ToMicroseconds() && !mManager->Buffered(mType).Contains(aTime)) {
|
||||
// We don't have the data to seek to.
|
||||
return SeekPromise::CreateAndReject(DemuxerFailureReason::WAITING_FOR_DATA,
|
||||
__func__);
|
||||
}
|
||||
const TrackBuffersManager::TrackBuffer& track =
|
||||
mManager->GetTrackBuffer(mType);
|
||||
TimeUnit lastKeyFrameTime;
|
||||
|
|
Загрузка…
Ссылка в новой задаче