Bug 1659941 - Avoid an IntervalSet copy when inserting frames in TrackBuffersManager. r=jya

Differential Revision: https://phabricator.services.mozilla.com/D87913
This commit is contained in:
Bryce Seager van Dyk 2020-08-22 18:48:09 +00:00
Родитель b0e7b41949
Коммит 7f964ba354
1 изменённых файлов: 1 добавлений и 4 удалений

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

@ -2080,10 +2080,7 @@ void TrackBuffersManager::InsertFrames(TrackBuffer& aSamples,
// the previous step and the next random access point after those removed
// frames.
TimeIntervals intersection = trackBuffer.mBufferedRanges;
intersection.Intersection(aIntervals);
if (!intersection.IsEmpty()) {
if (trackBuffer.mBufferedRanges.IntersectsStrict(aIntervals)) {
if (aSamples[0]->mKeyframe &&
(mType.Type() == MEDIAMIMETYPE("video/webm") ||
mType.Type() == MEDIAMIMETYPE("audio/webm"))) {