diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2014-01-21 16:23:41 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-29 14:30:12 +0100 |
commit | b690a4d90282d2cae5d7a10739d726594d036dde (patch) | |
tree | 1d41af1f810fcb78930c9c24fdc510d3827667b8 | |
parent | deaeb676eb53100c1b44f720791ed52145016b0c (diff) |
Android: fix crash in QAndroidCaptureSession.
Don't try to apply video recording settings until a camera is actually
started.
Change-Id: I5348b91669835b9d776f56a3f49e3f8a11533d15
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
-rw-r--r-- | src/plugins/android/src/mediacapture/qandroidcapturesession.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp b/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp index 3962baba8..f40ec2498 100644 --- a/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp +++ b/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp @@ -389,7 +389,7 @@ void QAndroidCaptureSession::applySettings() } // video settings - if (m_cameraSession && m_videoSettingsDirty) { + if (m_cameraSession && m_cameraSession->camera() && m_videoSettingsDirty) { if (m_videoSettings.resolution().isEmpty()) { m_videoSettings.setResolution(m_defaultSettings.videoResolution); m_resolutionDirty = true; @@ -466,6 +466,8 @@ void QAndroidCaptureSession::onCameraOpened() qSort(m_supportedResolutions.begin(), m_supportedResolutions.end(), qt_sizeLessThan); qSort(m_supportedFramerates.begin(), m_supportedFramerates.end()); + + applySettings(); } QAndroidCaptureSession::CaptureProfile QAndroidCaptureSession::getProfile(int id) |