summaryrefslogtreecommitdiff
path: root/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-10 13:08:05 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-10 13:08:05 +0200
commit81cbb264cb9446c4408124d50aeff50164ad0ab4 (patch)
tree6acc39b8ea0165562d480f1c54608c6c4ae9f865 /Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
parentbeaeeb99881184fd368c121fcbb1a31c78b794a3 (diff)
parent5087e0ced43d813eb6f765913a6fc3958d2a7a9d (diff)
downloadqtwebkit-81cbb264cb9446c4408124d50aeff50164ad0ab4.tar.gz
Merge remote-tracking branch 'origin/5.212' into dev
Change-Id: I4e185b15690118515df80a79b786cbb8b30dd144
Diffstat (limited to 'Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp')
-rw-r--r--Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp16
1 files changed, 6 insertions, 10 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;