зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1258922: [MSE] P3. Check that the data we are attempting to skip to is buffered. r=gerald
MozReview-Commit-ID: DCQkIimciEe
This commit is contained in:
Родитель
55e5e7da77
Коммит
b2b17692f7
|
@ -462,11 +462,17 @@ MediaSourceTrackDemuxer::DoGetSamples(int32_t aNumSamples)
|
|||
RefPtr<MediaSourceTrackDemuxer::SkipAccessPointPromise>
|
||||
MediaSourceTrackDemuxer::DoSkipToNextRandomAccessPoint(media::TimeUnit aTimeThreadshold)
|
||||
{
|
||||
bool found;
|
||||
uint32_t parsed =
|
||||
mManager->SkipToNextRandomAccessPoint(mType, aTimeThreadshold, found);
|
||||
if (found) {
|
||||
return SkipAccessPointPromise::CreateAndResolve(parsed, __func__);
|
||||
uint32_t parsed = 0;
|
||||
// Ensure that the data we are about to skip to is still available.
|
||||
TimeIntervals buffered = mManager->Buffered(mType);
|
||||
buffered.SetFuzz(MediaSourceDemuxer::EOS_FUZZ);
|
||||
if (buffered.Contains(aTimeThreadshold)) {
|
||||
bool found;
|
||||
parsed =
|
||||
mManager->SkipToNextRandomAccessPoint(mType, aTimeThreadshold, found);
|
||||
if (found) {
|
||||
return SkipAccessPointPromise::CreateAndResolve(parsed, __func__);
|
||||
}
|
||||
}
|
||||
SkipFailureHolder holder(
|
||||
mManager->IsEnded() ? DemuxerFailureReason::END_OF_STREAM :
|
||||
|
|
Загрузка…
Ссылка в новой задаче