Title: [171992] trunk/Source/WebCore
Revision
171992
Author
jer.no...@apple.com
Date
2014-08-04 10:17:30 -0700 (Mon, 04 Aug 2014)

Log Message

[MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
https://bugs.webkit.org/show_bug.cgi?id=135422

Reviewed by Eric Carlson.

When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
the SourceBufferPrivate may signal that it's ready for new samples through the
sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
continue to provideMediaData(), as that will append samples from the prior-to-seeking media
timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
display those frames as quickly as possible (the "fast forward" behavior) in order to catch
up to the new current time.

If a re-enqueue is pending, don't provide media data in response to being notified that the
SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
are appended.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
* dom/Document.cpp:
(WebCore::Document::unregisterCollection):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171991 => 171992)


--- trunk/Source/WebCore/ChangeLog	2014-08-04 15:08:17 UTC (rev 171991)
+++ trunk/Source/WebCore/ChangeLog	2014-08-04 17:17:30 UTC (rev 171992)
@@ -1,3 +1,27 @@
+2014-08-04  Jer Noble  <jer.no...@apple.com>
+
+        [MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
+        https://bugs.webkit.org/show_bug.cgi?id=135422
+
+        Reviewed by Eric Carlson.
+
+        When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
+        the SourceBufferPrivate may signal that it's ready for new samples through the
+        sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
+        continue to provideMediaData(), as that will append samples from the prior-to-seeking media
+        timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
+        display those frames as quickly as possible (the "fast forward" behavior) in order to catch
+        up to the new current time.
+
+        If a re-enqueue is pending, don't provide media data in response to being notified that the
+        SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
+        are appended.
+
+        * Modules/mediasource/SourceBuffer.cpp:
+        (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
+        * dom/Document.cpp:
+        (WebCore::Document::unregisterCollection):
+
 2014-08-04  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [GTK] Install all unstable webkitdom headers

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (171991 => 171992)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2014-08-04 15:08:17 UTC (rev 171991)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2014-08-04 17:17:30 UTC (rev 171992)
@@ -1362,7 +1362,9 @@
     if (it == m_trackBufferMap.end())
         return;
 
-    provideMediaData(it->value, trackID);
+    TrackBuffer& trackBuffer = it->value;
+    if (!trackBuffer.needsReenqueueing)
+        provideMediaData(trackBuffer, trackID);
 }
 
 void SourceBuffer::provideMediaData(TrackBuffer& trackBuffer, AtomicString trackID)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to