diff options
author | Piotr Srebrny <piotr.srebrny@qt.io> | 2022-08-24 11:55:17 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-08-25 14:26:10 +0000 |
commit | 923b25ead47244d3c2130eb5306b5dc9f9dc112b (patch) | |
tree | cb107a2344776967525429f013717373f91003d2 | |
parent | cce98a3be75501292b7fa5705324499d6e8dd83f (diff) | |
download | qtmultimedia-923b25ead47244d3c2130eb5306b5dc9f9dc112b.tar.gz |
Set wasActiveSession also when session is activating but not active yet
Failing to set the flag wasActiveSession when session is activating
causes session deactivation when the encoder stops in function
QWindowsMediaEncoder::stop(). This can be observed in tests when
recording commences soon after the session is activated.
Change-Id: Id72dbbc7be808803edc059530a93a8c4554c9f6e
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
(cherry picked from commit 424350beaeb1c60638bc44f9d8ad8c20217225d8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/plugins/multimedia/windows/mediacapture/qwindowsmediaencoder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/multimedia/windows/mediacapture/qwindowsmediaencoder.cpp b/src/plugins/multimedia/windows/mediacapture/qwindowsmediaencoder.cpp index bde9a3aa7..d5eb07980 100644 --- a/src/plugins/multimedia/windows/mediacapture/qwindowsmediaencoder.cpp +++ b/src/plugins/multimedia/windows/mediacapture/qwindowsmediaencoder.cpp @@ -45,7 +45,7 @@ void QWindowsMediaEncoder::record(QMediaEncoderSettings &settings) if (m_state != QMediaRecorder::StoppedState) return; - m_sessionWasActive = m_mediaDeviceSession->isActive(); + m_sessionWasActive = m_mediaDeviceSession->isActive() || m_mediaDeviceSession->isActivating(); if (!m_sessionWasActive) { |