summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJøger Hansegård <joger.hansegard@qt.io>2023-06-06 20:01:26 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-06-06 20:18:41 +0000
commit565950c5c24e5867f49e077bd720999d6a191273 (patch)
tree1b097aece58317112c5d43ef2998f8467762ee12 /src
parentf8436c979380f91cf2f1abd1133d8524547197c3 (diff)
Avoid flooding log during DXGI screen capture error handling
Due to an error handling bug, the DXGI screen capture would flood the log when facing lost duplication interface. This can happen for example when pushing Ctr+Alt+Del while screen capturing is ongoing. This change does not implement recovery after lost duplication interface, but prevents flooding the log by avoiding repeatedly calling IDXGIOutputDuplication::ReleaseFrame Task-number: QTBUG-113460 Change-Id: Iad5761cc4cfe5189460944528b35fd136085631f Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 59a50bebb386c83a829ffabd7392c1de2bdb9f5c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/multimedia/ffmpeg/qffmpegscreencapture_dxgi.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/multimedia/ffmpeg/qffmpegscreencapture_dxgi.cpp b/src/plugins/multimedia/ffmpeg/qffmpegscreencapture_dxgi.cpp
index 7799f1a49..1c88e1c44 100644
--- a/src/plugins/multimedia/ffmpeg/qffmpegscreencapture_dxgi.cpp
+++ b/src/plugins/multimedia/ffmpeg/qffmpegscreencapture_dxgi.cpp
@@ -182,11 +182,11 @@ private:
QMaybe<QComPtr<ID3D11Texture2D>> getNextFrame()
{
if (m_releaseFrame) {
+ m_releaseFrame = false;
+
HRESULT hr = m_duplication->ReleaseFrame();
if (FAILED(hr))
return "Failed to release duplication frame. " + ::errorString(hr);
-
- m_releaseFrame = false;
}
QComPtr<IDXGIResource> frame;