Title: [188424] branches/safari-601.1-branch/Source/WebCore
- Revision
- 188424
- Author
- bshaf...@apple.com
- Date
- 2015-08-13 18:06:02 -0700 (Thu, 13 Aug 2015)
Log Message
Merged r188416. rdar://problem/21367467
Modified Paths
Diff
Modified: branches/safari-601.1-branch/Source/WebCore/ChangeLog (188423 => 188424)
--- branches/safari-601.1-branch/Source/WebCore/ChangeLog 2015-08-14 00:45:07 UTC (rev 188423)
+++ branches/safari-601.1-branch/Source/WebCore/ChangeLog 2015-08-14 01:06:02 UTC (rev 188424)
@@ -1,3 +1,29 @@
+2015-08-13 Babak Shafiei <bshaf...@apple.com>
+
+ Merge r188416.
+
+ 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-08-13 Matthew Hanson <matthew_han...@apple.com>
Merge r188390. rdar://problem/21367467
Modified: branches/safari-601.1-branch/Source/WebCore/html/HTMLMediaElement.cpp (188423 => 188424)
--- branches/safari-601.1-branch/Source/WebCore/html/HTMLMediaElement.cpp 2015-08-14 00:45:07 UTC (rev 188423)
+++ branches/safari-601.1-branch/Source/WebCore/html/HTMLMediaElement.cpp 2015-08-14 01:06:02 UTC (rev 188424)
@@ -2446,7 +2446,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-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (188423 => 188424)
--- branches/safari-601.1-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2015-08-14 00:45:07 UTC (rev 188423)
+++ branches/safari-601.1-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2015-08-14 01:06:02 UTC (rev 188424)
@@ -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