Changeset 245846 in webkit


Ignore:
Timestamp:
May 28, 2019 9:38:04 PM (5 years ago)
Author:
Fujii Hironori
Message:

[WinCairo] ASSERTION FAILED: !m_preparingToPlay in MediaPlayerPrivateMediaFoundation::prepareToPlay
https://bugs.webkit.org/show_bug.cgi?id=190747

Reviewed by Alex Christensen.

HTMLMediaElement::prepareToPlay had a assertion ensuring that it
was not called twice. However, it was called twice. The first from
HTMLMediaElement::load, the second from
MediaPlayerPrivateMediaFoundation::onTopologySet.

prepareToPlay started loading. And, loading should be started
after onTopologySet is called back.

Covered by existing tests.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet): Moved code from prepareToPlay.
(WebCore::MediaPlayerPrivateMediaFoundation::prepareToPlay): Deleted and moved the code to onTopologySet.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Removed prepareToPlay declaration.
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r245845 r245846  
     12019-05-28  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [WinCairo] ASSERTION FAILED: !m_preparingToPlay in MediaPlayerPrivateMediaFoundation::prepareToPlay
     4        https://bugs.webkit.org/show_bug.cgi?id=190747
     5
     6        Reviewed by Alex Christensen.
     7
     8        HTMLMediaElement::prepareToPlay had a assertion ensuring that it
     9        was not called twice. However, it was called twice. The first from
     10        HTMLMediaElement::load, the second from
     11        MediaPlayerPrivateMediaFoundation::onTopologySet.
     12
     13        prepareToPlay started loading. And, loading should be started
     14        after onTopologySet is called back.
     15
     16        Covered by existing tests.
     17
     18        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
     19        (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet): Moved code from prepareToPlay.
     20        (WebCore::MediaPlayerPrivateMediaFoundation::prepareToPlay): Deleted and moved the code to onTopologySet.
     21        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Removed prepareToPlay declaration.
     22
    1232019-05-28  Fujii Hironori  <Hironori.Fujii@sony.com>
    224
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp

    r245845 r245846  
    186186}
    187187
    188 void MediaPlayerPrivateMediaFoundation::prepareToPlay()
    189 {
    190     // We call startSession() to start buffering video data.
    191     // When we have received enough data, we pause, so that we don't actually start the playback.
    192     ASSERT(m_paused);
    193     ASSERT(!m_preparingToPlay);
    194     m_preparingToPlay = startSession();
    195 }
    196 
    197188void MediaPlayerPrivateMediaFoundation::play()
    198189{
     
    915906
    916907    // It is expected that we start buffering data from the network now.
    917     prepareToPlay();
     908    // We call startSession() to start buffering video data.
     909    // When we have received enough data, we pause, so that we don't actually start the playback.
     910    ASSERT(m_paused);
     911    ASSERT(!m_preparingToPlay);
     912    m_preparingToPlay = startSession();
    918913}
    919914
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h

    r238040 r245846  
    5959    void load(const String& url) override;
    6060    void cancelLoad() override;
    61 
    62     void prepareToPlay() override;
    6361
    6462    void play() override;
Note: See TracChangeset for help on using the changeset viewer.