зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1229339: Partial revert of commit c15c9f37f. r=cpearce
Replacement of nsTArray<MediaByteRange> by MediaByteRangeSet in the MoofParser was incorrect.
This commit is contained in:
Родитель
a658f26611
Коммит
7ae8605a51
|
@ -59,7 +59,7 @@ MoofParser::RebuildFragmentedIndex(BoxContext& aContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
mMoofs.AppendElement(moof);
|
mMoofs.AppendElement(moof);
|
||||||
mMediaRanges += moof.mRange;
|
mMediaRanges.AppendElement(moof.mRange);
|
||||||
foundValidMoof = true;
|
foundValidMoof = true;
|
||||||
} else if (box.IsType("mdat") && !Moofs().IsEmpty()) {
|
} else if (box.IsType("mdat") && !Moofs().IsEmpty()) {
|
||||||
// Check if we have all our data from last moof.
|
// Check if we have all our data from last moof.
|
||||||
|
@ -67,8 +67,8 @@ MoofParser::RebuildFragmentedIndex(BoxContext& aContext)
|
||||||
media::Interval<int64_t> datarange(moof.mMdatRange.mStart, moof.mMdatRange.mEnd, 0);
|
media::Interval<int64_t> datarange(moof.mMdatRange.mStart, moof.mMdatRange.mEnd, 0);
|
||||||
media::Interval<int64_t> mdat(box.Range().mStart, box.Range().mEnd, 0);
|
media::Interval<int64_t> mdat(box.Range().mStart, box.Range().mEnd, 0);
|
||||||
if (datarange.Intersects(mdat)) {
|
if (datarange.Intersects(mdat)) {
|
||||||
mMediaRanges.LastInterval() =
|
mMediaRanges.LastElement() =
|
||||||
mMediaRanges.LastInterval().Span(box.Range());
|
mMediaRanges.LastElement().Span(box.Range());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mOffset = box.NextOffset();
|
mOffset = box.NextOffset();
|
||||||
|
|
|
@ -245,7 +245,7 @@ private:
|
||||||
void ScanForMetadata(mozilla::MediaByteRange& aFtyp,
|
void ScanForMetadata(mozilla::MediaByteRange& aFtyp,
|
||||||
mozilla::MediaByteRange& aMoov);
|
mozilla::MediaByteRange& aMoov);
|
||||||
nsTArray<Moof> mMoofs;
|
nsTArray<Moof> mMoofs;
|
||||||
MediaByteRangeSet mMediaRanges;
|
nsTArray<MediaByteRange> mMediaRanges;
|
||||||
bool mIsAudio;
|
bool mIsAudio;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче