diff options
author | Christian Strømme <christian.stromme@theqtcompany.com> | 2016-01-12 15:12:24 +0100 |
---|---|---|
committer | Christian Strømme <christian.stromme@theqtcompany.com> | 2016-01-12 15:15:37 +0100 |
commit | 963a534e339c4515f0e1abf85c6e91ec3de145de (patch) | |
tree | d5b291b432a4a8b50cdfb1091392685c0f48a6d5 /src/plugins | |
parent | 9a2fcd06a8ee306f2a90be93640901b9c8197911 (diff) | |
parent | c953ef391086f4b689f6adc6d29cb8021db64845 (diff) | |
download | qtmultimedia-963a534e339c4515f0e1abf85c6e91ec3de145de.tar.gz |
Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: Ia563cf734178b821c2aadda8b79b1f09b17de7cd
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/android/src/mediacapture/qandroidcapturesession.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp b/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp index d25438ec7..f02016654 100644 --- a/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp +++ b/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp @@ -234,13 +234,15 @@ void QAndroidCaptureSession::start() if (!m_mediaRecorder->prepare()) { emit error(QMediaRecorder::FormatError, QLatin1String("Unable to prepare the media recorder.")); - restartViewfinder(); + if (m_cameraSession) + restartViewfinder(); return; } if (!m_mediaRecorder->start()) { emit error(QMediaRecorder::FormatError, QLatin1String("Unable to start the media recorder.")); - restartViewfinder(); + if (m_cameraSession) + restartViewfinder(); return; } @@ -433,6 +435,9 @@ void QAndroidCaptureSession::updateViewfinder() void QAndroidCaptureSession::restartViewfinder() { + if (!m_cameraSession) + return; + m_cameraSession->camera()->reconnect(); // This is not necessary on most devices, but it crashes on some if we don't stop the |