Changeset 188416 in webkit
- Timestamp:
- Aug 13, 2015 4:39:01 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r188411 r188416 1 2015-08-13 Jer Noble <jer.noble@apple.com> 2 3 Don't short circuit seeking 4 https://bugs.webkit.org/show_bug.cgi?id=147892 5 6 Reviewed by Eric Carlson. 7 8 When two seekWithTolerance() requests come in before the first is acted upon in seekTask(), 9 the second will result in a "no seek required" conditional, because the new "currentTime" is 10 assumed to be the destination time of the first seek. 11 12 When cancelling a pending seek, first replace the "now" value with the "now" value from the 13 replaced seek, thus preserving the original currentTime across all replacement seeks. 14 15 Drive-by fix: some added logging causes occasional crashes, due to the underlying object being 16 accessed having been deleted. 17 18 * html/HTMLMediaElement.cpp: 19 (WebCore::HTMLMediaElement::seekWithTolerance): 20 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 21 (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): 22 1 23 2015-08-13 Brent Fulgham <bfulgham@apple.com> 2 24 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r188390 r188416 2496 2496 LOG(Media, "HTMLMediaElement::seekWithTolerance(%p) - cancelling pending seeks", this); 2497 2497 m_seekTaskQueue.cancelAllTasks(); 2498 m_pendingSeek = nullptr; 2498 if (m_pendingSeek) { 2499 now = m_pendingSeek->now; 2500 m_pendingSeek = nullptr; 2501 } 2499 2502 m_pendingSeekType = NoSeek; 2500 2503 } -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r188390 r188416 1309 1309 1310 1310 [m_avPlayerItem.get() seekToTime:cmTime toleranceBefore:cmBefore toleranceAfter:cmAfter completionHandler:^(BOOL finished) { 1311 double currentTime = CMTimeGetSeconds([m_avPlayerItem currentTime]); 1312 callOnMainThread([weakThis, finished, currentTime] { 1313 UNUSED_PARAM(currentTime); 1311 callOnMainThread([weakThis, finished] { 1314 1312 auto _this = weakThis.get(); 1315 LOG(Media, "MediaPlayerPrivateAVFoundationObjC::seekToTime(%p) - completion handler called, currentTime = %f", _this, currentTime);1316 1313 if (!_this) 1317 1314 return;
Note: See TracChangeset
for help on using the changeset viewer.