Changeset 166282 in webkit


Ignore:
Timestamp:
Mar 25, 2014 9:16:53 PM (10 years ago)
Author:
jer.noble@apple.com
Message:

[MSE] Duplicate 'seeked' events.
https://bugs.webkit.org/show_bug.cgi?id=130754

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-duplicate-seeked.html

During certain seek operations, HTMLMediaElement::finishSeek() can be called re-entrantly due to
the ready state changing as a result of MediaSource::monitorSourceBuffers(). Move this call to the
end of finishSeek() after m_seeking has been cleared.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::parseAttribute):

LayoutTests:

  • media/media-source/media-source-duplicate-seeked-expected.txt: Added.
  • media/media-source/media-source-duplicate-seeked.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r166279 r166282  
     12014-03-25  Jer Noble  <jer.noble@apple.com>
     2
     3        [MSE] Duplicate 'seeked' events.
     4        https://bugs.webkit.org/show_bug.cgi?id=130754
     5
     6        Reviewed by Eric Carlson.
     7
     8        * media/media-source/media-source-duplicate-seeked-expected.txt: Added.
     9        * media/media-source/media-source-duplicate-seeked.html: Added.
     10
    1112014-03-25  James Craig  <jcraig@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r166279 r166282  
     12014-03-25  Jer Noble  <jer.noble@apple.com>
     2
     3        [MSE] Duplicate 'seeked' events.
     4        https://bugs.webkit.org/show_bug.cgi?id=130754
     5
     6        Reviewed by Eric Carlson.
     7
     8        Test: media/media-source/media-source-duplicate-seeked.html
     9
     10        During certain seek operations, HTMLMediaElement::finishSeek() can be called re-entrantly due to
     11        the ready state changing as a result of MediaSource::monitorSourceBuffers(). Move this call to the
     12        end of finishSeek() after m_seeking has been cleared.
     13
     14        * html/HTMLMediaElement.cpp:
     15        (WebCore::HTMLMediaElement::parseAttribute):
     16
    1172014-03-25  James Craig  <jcraig@apple.com>
    218
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r166274 r166282  
    24822482    LOG(Media, "HTMLMediaElement::finishSeek");
    24832483
     2484    // 4.8.10.9 Seeking
     2485    // 14 - Set the seeking IDL attribute to false.
     2486    m_seeking = false;
     2487
     2488    // 15 - Run the time maches on steps.
     2489    // Handled by mediaPlayerTimeChanged().
     2490
     2491    // 16 - Queue a task to fire a simple event named timeupdate at the element.
     2492    scheduleEvent(eventNames().timeupdateEvent);
     2493
     2494    // 17 - Queue a task to fire a simple event named seeked at the element.
     2495    scheduleEvent(eventNames().seekedEvent);
     2496
    24842497#if ENABLE(MEDIA_SOURCE)
    24852498    if (m_mediaSource)
    24862499        m_mediaSource->monitorSourceBuffers();
    24872500#endif
    2488 
    2489     // 4.8.10.9 Seeking
    2490     // 14 - Set the seeking IDL attribute to false.
    2491     m_seeking = false;
    2492 
    2493     // 15 - Run the time maches on steps.
    2494     // Handled by mediaPlayerTimeChanged().
    2495 
    2496     // 16 - Queue a task to fire a simple event named timeupdate at the element.
    2497     scheduleEvent(eventNames().timeupdateEvent);
    2498 
    2499     // 17 - Queue a task to fire a simple event named seeked at the element.
    2500     scheduleEvent(eventNames().seekedEvent);
    25012501}
    25022502
Note: See TracChangeset for help on using the changeset viewer.