Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-50282

[qt-Android] Don't call restartViewfinder() unconditionally if record fail to start

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.6.0 RC
    • 5.5.1
    • Multimedia
    • None
    • Android
    • 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()

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stromme Christian
            jianliang79 liang jian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes