diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/win')
-rw-r--r-- | Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp | 16 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h | 2 |
2 files changed, 6 insertions, 12 deletions
diff --git a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp index 98f2ec964..a56a47a3e 100644 --- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp +++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp @@ -193,15 +193,6 @@ void MediaPlayerPrivateMediaFoundation::cancelLoad() 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(); @@ -937,7 +928,11 @@ void MediaPlayerPrivateMediaFoundation::onTopologySet() } // 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() @@ -2920,6 +2915,7 @@ HRESULT MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample(IMFS D3DSURFACE_DESC desc; if (SUCCEEDED(surface->GetDesc(&desc))) format = desc.Format; + m_memSurface.clear(); hr = m_device->CreateOffscreenPlainSurface(width, height, format, D3DPOOL_SYSTEMMEM, &m_memSurface, nullptr); m_width = width; m_height = height; diff --git a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h index 0fe07fa13..d945c20d0 100644 --- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h +++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h @@ -60,8 +60,6 @@ public: void load(const String& url) override; void cancelLoad() override; - void prepareToPlay() override; - void play() override; void pause() override; |