AVFoundation: fix setting up the video capture session.

Because of an incorrect 'if' condition, the video capture session was
set up twice when starting the camera.

Change-Id: I4211a8c77ab9b8086628fb0f12fb28842de830cf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
Yoann Lopes
2015-11-19 15:32:48 +01:00
parent 8dc46cef05
commit 5ed9b6d6d7

View File

@@ -359,7 +359,7 @@ void AVFMediaRecorderControl::setupSessionForCapture()
}
} else if (m_connected
&& (!m_cameraControl->captureMode().testFlag(QCamera::CaptureVideo)
|| m_session->state() != QCamera::ActiveState)) {
|| m_session->state() == QCamera::UnloadedState)) {
[captureSession removeOutput:m_movieOutput];