Bug 1481397 - P1. Properly recalculate highest start timestamp when samples are removed. r=bryce

Summary: When removing frames from the trackbuffer we may remove frames outside the original removal interval as we must remove all frames depending on the removed frames.

Differential Revision: https://phabricator.services.mozilla.com/D2837
This commit is contained in:
Jean-Yves Avenard 2018-08-07 11:32:37 +02:00
parent f3e5678c1a
commit 5e17996c2a

View File

@ -2105,7 +2105,8 @@ TrackBuffersManager::RemoveFrames(const TimeIntervals& aIntervals,
data.RemoveElementsAt(firstRemovedIndex.ref(), data.RemoveElementsAt(firstRemovedIndex.ref(),
lastRemovedIndex - firstRemovedIndex.ref() + 1); lastRemovedIndex - firstRemovedIndex.ref() + 1);
if (aIntervals.GetEnd() >= aTrackData.mHighestStartTimestamp) { if (removedIntervals.GetEnd() >= aTrackData.mHighestStartTimestamp &&
removedIntervals.GetStart() <= aTrackData.mHighestStartTimestamp) {
// The sample with the highest presentation time got removed. // The sample with the highest presentation time got removed.
// Rescan the trackbuffer to determine the new one. // Rescan the trackbuffer to determine the new one.
TimeUnit highestStartTime; TimeUnit highestStartTime;