diff --git a/package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt b/package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt index a622be5b1f..83fc6981b2 100644 --- a/package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt +++ b/package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt @@ -1,7 +1,6 @@ package com.mrousavy.camera.core import android.content.Context -import android.media.ImageWriter import android.media.MediaCodec import android.media.MediaRecorder import android.os.Build @@ -37,7 +36,6 @@ class RecordingSession(context: Context, private val recorder: MediaRecorder private val outputFile: File private var startTime: Long? = null - private var imageWriter: ImageWriter? = null val surface: Surface = MediaCodec.createPersistentInputSurface() init { @@ -101,9 +99,6 @@ class RecordingSession(context: Context, try { recorder.stop() recorder.release() - - imageWriter?.close() - imageWriter = null } catch (e: Error) { Log.e(TAG, "Failed to stop MediaRecorder!", e) }