Title: [191088] branches/safari-601.1.46-branch/Source/WebCore

Diff

Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (191087 => 191088)


--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-10-15 06:46:12 UTC (rev 191087)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-10-15 06:46:15 UTC (rev 191088)
@@ -1,5 +1,31 @@
 2015-10-14  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r188416. rdar://problem/22803749
+
+    2015-08-13  Jer Noble  <jer.no...@apple.com>
+
+            Don't short circuit seeking
+            https://bugs.webkit.org/show_bug.cgi?id=147892
+
+            Reviewed by Eric Carlson.
+
+            When two seekWithTolerance() requests come in before the first is acted upon in seekTask(),
+            the second will result in a "no seek required" conditional, because the new "currentTime" is
+            assumed to be the destination time of the first seek.
+
+            When cancelling a pending seek, first replace the "now" value with the "now" value from the
+            replaced seek, thus preserving the original currentTime across all replacement seeks.
+
+            Drive-by fix: some added logging causes occasional crashes, due to the underlying object being
+            accessed having been deleted.
+
+            * html/HTMLMediaElement.cpp:
+            (WebCore::HTMLMediaElement::seekWithTolerance):
+            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
+
+2015-10-14  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r188390. rdar://problem/22803749
 
     2015-08-13  Eric Carlson  <eric.carl...@apple.com>

Modified: branches/safari-601.1.46-branch/Source/WebCore/html/HTMLMediaElement.cpp (191087 => 191088)


--- branches/safari-601.1.46-branch/Source/WebCore/html/HTMLMediaElement.cpp	2015-10-15 06:46:12 UTC (rev 191087)
+++ branches/safari-601.1.46-branch/Source/WebCore/html/HTMLMediaElement.cpp	2015-10-15 06:46:15 UTC (rev 191088)
@@ -2442,7 +2442,10 @@
     if (m_seekTaskQueue.hasPendingTasks()) {
         LOG(Media, "HTMLMediaElement::seekWithTolerance(%p) - cancelling pending seeks", this);
         m_seekTaskQueue.cancelAllTasks();
-        m_pendingSeek = nullptr;
+        if (m_pendingSeek) {
+            now = m_pendingSeek->now;
+            m_pendingSeek = nullptr;
+        }
         m_pendingSeekType = NoSeek;
     }
 

Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (191087 => 191088)


--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2015-10-15 06:46:12 UTC (rev 191087)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2015-10-15 06:46:15 UTC (rev 191088)
@@ -1308,11 +1308,8 @@
     LOG(Media, "MediaPlayerPrivateAVFoundationObjC::seekToTime(%p) - calling seekToTime", this);
 
     [m_avPlayerItem.get() seekToTime:cmTime toleranceBefore:cmBefore toleranceAfter:cmAfter completionHandler:^(BOOL finished) {
-        double currentTime = CMTimeGetSeconds([m_avPlayerItem currentTime]);
-        callOnMainThread([weakThis, finished, currentTime] {
-            UNUSED_PARAM(currentTime);
+        callOnMainThread([weakThis, finished] {
             auto _this = weakThis.get();
-            LOG(Media, "MediaPlayerPrivateAVFoundationObjC::seekToTime(%p) - completion handler called, currentTime = %f", _this, currentTime);
             if (!_this)
                 return;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to