Fix last segment issue
This commit is contained in:
parent
65021b895a
commit
ed331f2f69
@ -95,16 +95,14 @@ class ChunkedRecordingManager(private val encoder: MediaCodec, private val outpu
|
||||
fun finish() {
|
||||
muxer.stop()
|
||||
muxer.release()
|
||||
this.callbacks.onVideoChunkReady(filepath, chunkIndex)
|
||||
}
|
||||
}
|
||||
|
||||
private var muxerContext: MuxerContext? = null
|
||||
|
||||
private fun createNextMuxer(bufferInfo: BufferInfo) {
|
||||
muxerContext?.let {
|
||||
it.finish()
|
||||
this.callbacks.onVideoChunkReady(it.filepath, it.chunkIndex)
|
||||
}
|
||||
muxerContext?.finish()
|
||||
chunkIndex++
|
||||
|
||||
val newFileName = "$chunkIndex.mp4"
|
||||
|
Loading…
Reference in New Issue
Block a user