Title: [245846] trunk/Source/WebCore
Revision
245846
Author
[email protected]
Date
2019-05-28 21:38:04 -0700 (Tue, 28 May 2019)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (245845 => 245846)


--- trunk/Source/WebCore/ChangeLog	2019-05-29 04:33:26 UTC (rev 245845)
+++ trunk/Source/WebCore/ChangeLog	2019-05-29 04:38:04 UTC (rev 245846)
@@ -1,5 +1,27 @@
 2019-05-28  Fujii Hironori  <[email protected]>
 
+        [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.
+
+2019-05-28  Fujii Hironori  <[email protected]>
+
         [WinCairo][MediaFoundation] Assertion failure in MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample
         https://bugs.webkit.org/show_bug.cgi?id=198290
 

Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp (245845 => 245846)


--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp	2019-05-29 04:33:26 UTC (rev 245845)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp	2019-05-29 04:38:04 UTC (rev 245846)
@@ -185,15 +185,6 @@
     notImplemented();
 }
 
-void MediaPlayerPrivateMediaFoundation::prepareToPlay()
-{
-    // We call startSession() to start buffering video data.
-    // When we have received enough data, we pause, so that we don't actually start the playback.
-    ASSERT(m_paused);
-    ASSERT(!m_preparingToPlay);
-    m_preparingToPlay = startSession();
-}
-
 void MediaPlayerPrivateMediaFoundation::play()
 {
     m_paused = !startSession();
@@ -914,7 +905,11 @@
     }
 
     // It is expected that we start buffering data from the network now.
-    prepareToPlay();
+    // We call startSession() to start buffering video data.
+    // When we have received enough data, we pause, so that we don't actually start the playback.
+    ASSERT(m_paused);
+    ASSERT(!m_preparingToPlay);
+    m_preparingToPlay = startSession();
 }
 
 void MediaPlayerPrivateMediaFoundation::onBufferingStarted()

Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h (245845 => 245846)


--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h	2019-05-29 04:33:26 UTC (rev 245845)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h	2019-05-29 04:38:04 UTC (rev 245846)
@@ -59,8 +59,6 @@
     void load(const String& url) override;
     void cancelLoad() override;
 
-    void prepareToPlay() override;
-
     void play() override;
     void pause() override;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to