Skip to content

Commit

Permalink
* fix: Properly close container when recording is stopped.
Browse files Browse the repository at this point in the history
  • Loading branch information
llfbandit committed Mar 24, 2024
1 parent 2e32a65 commit 03bb54c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ class MediaCodecEncoder(
recordStopped = true
}

override fun release() {
container.release()
}
override fun release() {}

@TargetApi(Build.VERSION_CODES.Q)
private fun findCodecForFormat(format: MediaFormat): String? {
Expand Down Expand Up @@ -86,6 +84,7 @@ class MediaCodecEncoder(
codec.stop()
codec.release()
container.stop()
container.release()

listener.onEncoderStop()
}
Expand Down

0 comments on commit 03bb54c

Please sign in to comment.