MediaRecorder.stop() hanging with Android 4.0 (ICS)

后端 未结 9 1201
夕颜
夕颜 2021-02-04 01:08

When calling stop() within my Video Capture activity, on occasion, the software will hang and will not come back to life. Only triggering an ANR by hitting \"Back\

9条回答
  •  粉色の甜心
    2021-02-04 02:03

    This also happened to me because I was releasing the camera before performing stop() on the recorder. It also explains the error message "Timed out waiting for incoming camera video frames". It's waiting for a camera that is already released. Make sure to stop the recorder - and only then release the camera:

    mMediaRecorder.stop();
    mMediaRecorder.release();
    
    camera.stopPreview();
    camera.release();
    

提交回复
热议问题