release the mediarecorder at closing the camera too

This commit is contained in:
tibbi 2018-06-10 12:51:38 +02:00
parent 2b6370c77e
commit 8443aac425
1 changed files with 2 additions and 0 deletions

View File

@ -206,6 +206,8 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
mCameraDevice = null mCameraDevice = null
mImageReader?.close() mImageReader?.close()
mImageReader = null mImageReader = null
mMediaRecorder?.release()
mMediaRecorder = null
} catch (e: Exception) { } catch (e: Exception) {
} finally { } finally {
mCameraOpenCloseLock.release() mCameraOpenCloseLock.release()