Title: [172000] trunk/Source/WebCore
- Revision
- 172000
- Author
- [email protected]
- Date
- 2014-08-04 13:54:57 -0700 (Mon, 04 Aug 2014)
Log Message
[MSE] Further fixes for "fast forward" playback after seeking in YouTube behavior.
https://bugs.webkit.org/show_bug.cgi?id=135572
Reviewed by Eric Carlson.
Two related fixes:
In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush samples, so that
the next time samples are re-enqueued, the starting point for re-enqueueing is correct.
In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue if they are before the
current media time.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::reenqueueMediaForTime):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (171999 => 172000)
--- trunk/Source/WebCore/ChangeLog 2014-08-04 20:50:19 UTC (rev 171999)
+++ trunk/Source/WebCore/ChangeLog 2014-08-04 20:54:57 UTC (rev 172000)
@@ -1,3 +1,22 @@
+2014-08-04 Jer Noble <[email protected]>
+
+ [MSE] Further fixes for "fast forward" playback after seeking in YouTube behavior.
+ https://bugs.webkit.org/show_bug.cgi?id=135572
+
+ Reviewed by Eric Carlson.
+
+ Two related fixes:
+
+ In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush samples, so that
+ the next time samples are re-enqueued, the starting point for re-enqueueing is correct.
+
+ In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue if they are before the
+ current media time.
+
+ * Modules/mediasource/SourceBuffer.cpp:
+ (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
+ (WebCore::SourceBuffer::reenqueueMediaForTime):
+
2014-08-04 Matt Baker <[email protected]>
Web Inspector: All-caps CSS properties are not shown in Computed pane
Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (171999 => 172000)
--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2014-08-04 20:50:19 UTC (rev 171999)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2014-08-04 20:54:57 UTC (rev 172000)
@@ -1208,8 +1208,10 @@
// Add the coded frame with the presentation timestamp, decode timestamp, and frame duration to the track buffer.
trackBuffer.samples.addSample(sample);
- DecodeOrderSampleMap::KeyType decodeKey(decodeTimestamp, presentationTimestamp);
- trackBuffer.decodeQueue.insert(DecodeOrderSampleMap::MapType::value_type(decodeKey, sample));
+ if (frameEndTimestamp > MediaTime::createWithDouble(m_source->currentTime())) {
+ DecodeOrderSampleMap::KeyType decodeKey(decodeTimestamp, presentationTimestamp);
+ trackBuffer.decodeQueue.insert(DecodeOrderSampleMap::MapType::value_type(decodeKey, sample));
+ }
// 1.18 Set last decode timestamp for track buffer to decode timestamp.
trackBuffer.lastDecodeTimestamp = decodeTimestamp;
@@ -1449,6 +1451,8 @@
nonDisplayingSamples.append(iter->second);
m_private->flushAndEnqueueNonDisplayingSamples(nonDisplayingSamples, trackID);
+ if (!nonDisplayingSamples.isEmpty())
+ trackBuffer.lastEnqueuedPresentationTime = nonDisplayingSamples.last()->presentationTime();
// Fill the decode queue with the remaining samples.
trackBuffer.decodeQueue.clear();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes