Title: [172573] branches/safari-600.1-branch/Source/WebCore
Revision
172573
Author
lforsch...@apple.com
Date
2014-08-13 21:21:25 -0700 (Wed, 13 Aug 2014)

Log Message

Merged r172538.  <rdar://problem/17665229>

Modified Paths

Diff

Modified: branches/safari-600.1-branch/Source/WebCore/ChangeLog (172572 => 172573)


--- branches/safari-600.1-branch/Source/WebCore/ChangeLog	2014-08-14 04:18:44 UTC (rev 172572)
+++ branches/safari-600.1-branch/Source/WebCore/ChangeLog	2014-08-14 04:21:25 UTC (rev 172573)
@@ -1,5 +1,22 @@
 2014-08-13  Lucas Forschler  <lforsch...@apple.com>
 
+        Merge r172538
+
+    2014-08-13  Jer Noble  <jer.no...@apple.com>
+
+            [MSE] Replacing existing samples with overlapping new samples will cause playback to stutter.
+            https://bugs.webkit.org/show_bug.cgi?id=135902
+
+            Reviewed by Eric Carlson.
+
+            Only mark the TrackBuffer as needing re-enqueueing if the samples removed by overlapping samples
+            themselves overlap with potentially enqueued but not yet displayed frames.
+
+            * Modules/mediasource/SourceBuffer.cpp:
+            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
+
+2014-08-13  Lucas Forschler  <lforsch...@apple.com>
+
         Merge r172534
 
     2014-08-13  Simon Fraser  <simon.fra...@apple.com>

Modified: branches/safari-600.1-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (172572 => 172573)


--- branches/safari-600.1-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2014-08-14 04:18:44 UTC (rev 172572)
+++ branches/safari-600.1-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2014-08-14 04:21:25 UTC (rev 172573)
@@ -1193,9 +1193,16 @@
                 trackBuffer.samples.removeSample(samplePair.second.get());
             }
 
+            // Only force the TrackBuffer to re-enqueue if the removed ranges overlap with enqueued and possibly
+            // not yet displayed samples.
+            MediaTime currentMediaTime = MediaTime::createWithDouble(m_source->currentTime());
+            PlatformTimeRanges possiblyEnqueuedRanges(currentMediaTime, trackBuffer.lastEnqueuedPresentationTime);
+            possiblyEnqueuedRanges.intersectWith(erasedRanges->ranges());
+            if (possiblyEnqueuedRanges.length())
+                trackBuffer.needsReenqueueing = true;
+
             erasedRanges->invert();
             m_buffered->intersectWith(*erasedRanges.get());
-            trackBuffer.needsReenqueueing = true;
         }
 
         // 1.17 If spliced audio frame is set:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to