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:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user