Title: [171412] branches/safari-600.1-branch/Source/WebCore
- Revision
- 171412
- Author
- dburk...@apple.com
- Date
- 2014-07-22 22:46:59 -0700 (Tue, 22 Jul 2014)
Log Message
Merge r171215
Modified Paths
Diff
Modified: branches/safari-600.1-branch/Source/WebCore/ChangeLog (171411 => 171412)
--- branches/safari-600.1-branch/Source/WebCore/ChangeLog 2014-07-23 05:44:59 UTC (rev 171411)
+++ branches/safari-600.1-branch/Source/WebCore/ChangeLog 2014-07-23 05:46:59 UTC (rev 171412)
@@ -1,5 +1,25 @@
2014-07-22 Dana Burkart <dburk...@apple.com>
+ Merge r171215.
+
+ 2014-07-17 Jer Noble <jer.no...@apple.com>
+
+ [MSE] Re-enqueue after a removeCodedFrames() only if the removed frames overlap what may have possibly been enqueued but undisplayed.
+ https://bugs.webkit.org/show_bug.cgi?id=135039
+
+ Reviewed by Eric Carlson.
+
+ When a client calls removeCodedFrames(), we must re-enqueue those ranges if the removed samples overlap with
+ enqueued but possibly un-displayed samples. Otherwise, replacement samples may lead to decode errors as those
+ new samples dependencies are not met. But if we re-enqueue too frequently, this may cause subtle but noticible
+ display timing glitches, so only re-enqueue when removeCodedFrames have a possiblity of removing enqueued, but
+ not yet displayed samples.
+
+ * Modules/mediasource/SourceBuffer.cpp:
+ (WebCore::SourceBuffer::removeCodedFrames):
+
+2014-07-22 Dana Burkart <dburk...@apple.com>
+
Merge r171210.
2014-07-17 Zalan Bujtas <za...@apple.com>
Modified: branches/safari-600.1-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (171411 => 171412)
--- branches/safari-600.1-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2014-07-23 05:44:59 UTC (rev 171411)
+++ branches/safari-600.1-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2014-07-23 05:46:59 UTC (rev 171412)
@@ -576,6 +576,13 @@
erasedRanges->add(startTime, endTime);
}
+ // Only force the TrackBuffer to re-enqueue if the removed ranges overlap with enqueued and possibly
+ // not yet displayed samples.
+ PlatformTimeRanges possiblyEnqueuedRanges(currentMediaTime, trackBuffer.lastEnqueuedPresentationTime);
+ possiblyEnqueuedRanges.intersectWith(erasedRanges->ranges());
+ if (possiblyEnqueuedRanges.length())
+ trackBuffer.needsReenqueueing = true;
+
erasedRanges->invert();
m_buffered->intersectWith(*erasedRanges);
@@ -584,8 +591,6 @@
// the HTMLMediaElement.readyState attribute to HAVE_METADATA and stall playback.
if (m_active && currentMediaTime >= start && currentMediaTime < end && m_private->readyState() > MediaPlayer::HaveMetadata)
m_private->setReadyState(MediaPlayer::HaveMetadata);
-
- trackBuffer.needsReenqueueing = true;
}
// 4. If buffer full flag equals true and this object is ready to accept more bytes, then set the buffer full flag to false.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes