Changeset 188424 in webkit


Ignore:
Timestamp:
Aug 13, 2015 6:06:02 PM (9 years ago)
Author:
bshafiei@apple.com
Message:

Merged r188416. rdar://problem/21367467

Location:
branches/safari-601.1-branch/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-601.1-branch/Source/WebCore/ChangeLog

    r188393 r188424  
     12015-08-13  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Merge r188416.
     4
     5    2015-08-13  Jer Noble  <jer.noble@apple.com>
     6
     7            Don't short circuit seeking
     8            https://bugs.webkit.org/show_bug.cgi?id=147892
     9
     10            Reviewed by Eric Carlson.
     11
     12            When two seekWithTolerance() requests come in before the first is acted upon in seekTask(),
     13            the second will result in a "no seek required" conditional, because the new "currentTime" is
     14            assumed to be the destination time of the first seek.
     15
     16            When cancelling a pending seek, first replace the "now" value with the "now" value from the
     17            replaced seek, thus preserving the original currentTime across all replacement seeks.
     18
     19            Drive-by fix: some added logging causes occasional crashes, due to the underlying object being
     20            accessed having been deleted.
     21
     22            * html/HTMLMediaElement.cpp:
     23            (WebCore::HTMLMediaElement::seekWithTolerance):
     24            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     25            (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
     26
    1272015-08-13  Matthew Hanson  <matthew_hanson@apple.com>
    228
  • branches/safari-601.1-branch/Source/WebCore/html/HTMLMediaElement.cpp

    r188393 r188424  
    24472447        LOG(Media, "HTMLMediaElement::seekWithTolerance(%p) - cancelling pending seeks", this);
    24482448        m_seekTaskQueue.cancelAllTasks();
    2449         m_pendingSeek = nullptr;
     2449        if (m_pendingSeek) {
     2450            now = m_pendingSeek->now;
     2451            m_pendingSeek = nullptr;
     2452        }
    24502453        m_pendingSeekType = NoSeek;
    24512454    }
  • branches/safari-601.1-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r188393 r188424  
    13091309
    13101310    [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] {
    13141312            auto _this = weakThis.get();
    1315             LOG(Media, "MediaPlayerPrivateAVFoundationObjC::seekToTime(%p) - completion handler called, currentTime = %f", _this, currentTime);
    13161313            if (!_this)
    13171314                return;
Note: See TracChangeset for help on using the changeset viewer.