Backed out changeset fe9ac1176159 (bug 1359058)

This commit is contained in:
Sebastian Hengst 2017-05-05 00:32:36 +02:00
Родитель 3ce2f90b36
Коммит 64ea535650
1 изменённых файлов: 16 добавлений и 4 удалений

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

@ -417,10 +417,22 @@ MP4TrackDemuxer::Seek(const media::TimeUnit& aTime)
mIterator->Seek(seekTime.ToMicroseconds());
// Check what time we actually seeked to.
mQueuedSample = mIterator->GetNext();
if (mQueuedSample) {
seekTime = mQueuedSample->mTime;
}
RefPtr<MediaRawData> sample;
do {
sample = GetNextSample();
if (!sample) {
return SeekPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_END_OF_STREAM,
__func__);
}
if (!sample->Size()) {
// This sample can't be decoded, continue searching.
continue;
}
if (sample->mKeyframe) {
mQueuedSample = sample;
seekTime = mQueuedSample->mTime;
}
} while (!mQueuedSample);
SetNextKeyFrameTime();