зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1185792: [webm] P1. Don't clear mNeedReIndex if GetCachedRanges is emtpy. r=jya
This commit is contained in:
Родитель
547404788d
Коммит
bc5430d2fd
|
@ -451,15 +451,15 @@ WebMDemuxer::EnsureUpToDateIndex()
|
|||
if (!mNeedReIndex) {
|
||||
return;
|
||||
}
|
||||
if (mInitData && mBufferedState->GetInitEndOffset() == -1) {
|
||||
mBufferedState->NotifyDataArrived(mInitData->Elements(), mInitData->Length(), 0);
|
||||
}
|
||||
AutoPinned<MediaResource> resource(mResource);
|
||||
nsTArray<MediaByteRange> byteRanges;
|
||||
nsresult rv = resource->GetCachedRanges(byteRanges);
|
||||
if (NS_FAILED(rv)) {
|
||||
if (NS_FAILED(rv) || !byteRanges.Length()) {
|
||||
return;
|
||||
}
|
||||
if (mInitData && mBufferedState->GetInitEndOffset() == -1) {
|
||||
mBufferedState->NotifyDataArrived(mInitData->Elements(), mInitData->Length(), 0);
|
||||
}
|
||||
mBufferedState->UpdateIndex(byteRanges, mResource);
|
||||
if (!mInitData && mBufferedState->GetInitEndOffset() != -1) {
|
||||
mInitData = mResource->MediaReadAt(0, mBufferedState->GetInitEndOffset());
|
||||
|
|
Загрузка…
Ссылка в новой задаче