Title: [171248] tags/Safari-538.46.41/Source/WebCore
- Revision
- 171248
- Author
- [email protected]
- Date
- 2014-07-18 15:50:59 -0700 (Fri, 18 Jul 2014)
Log Message
Merged r171215. <rdar://problem/17721209>
Modified Paths
Diff
Modified: tags/Safari-538.46.41/Source/WebCore/ChangeLog (171247 => 171248)
--- tags/Safari-538.46.41/Source/WebCore/ChangeLog 2014-07-18 22:39:39 UTC (rev 171247)
+++ tags/Safari-538.46.41/Source/WebCore/ChangeLog 2014-07-18 22:50:59 UTC (rev 171248)
@@ -1,5 +1,25 @@
2014-07-18 Lucas Forschler <[email protected]>
+ Merge r171215 (reland)
+
+ 2014-07-17 Jer Noble <[email protected]>
+
+ [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-18 Lucas Forschler <[email protected]>
+
Rollout r171215
2014-07-18 Lucas Forschler <[email protected]>
Modified: tags/Safari-538.46.41/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (171247 => 171248)
--- tags/Safari-538.46.41/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2014-07-18 22:39:39 UTC (rev 171247)
+++ tags/Safari-538.46.41/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2014-07-18 22:50:59 UTC (rev 171248)
@@ -575,6 +575,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);
@@ -583,8 +590,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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes