Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.5.1
-
None
-
-
c953ef391086f4b689f6adc6d29cb8021db64845
Description
There are following code In QAndroidCaptureSession::start():
if (!m_mediaRecorder->prepare()) { emit error(QMediaRecorder::FormatError, QLatin1String("Unable to prepare the media recorder.")); restartViewfinder(); return; } if (!m_mediaRecorder->start()) { emit error(QMediaRecorder::FormatError, QLatin1String("Unable to start the media recorder.")); restartViewfinder(); return; }
Once we failed to prepare or start android MediaRecorder we will call restartViewfinder(), that will cause crash if we are recording audio only. We should check whether m_cameraSession is not null before calling restartViewfinder()