Skip to content

Commit bf14d83

Browse files
committed
frameUsec -> frameDurationUsec
1 parent a7ae2b7 commit bf14d83

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sentry-android-replay/src/main/java/io/sentry/android/replay/video/SimpleMp4FrameMuxer.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import java.util.concurrent.TimeUnit.MICROSECONDS
3838
import java.util.concurrent.TimeUnit.MILLISECONDS
3939

4040
class SimpleMp4FrameMuxer(path: String, fps: Float) : SimpleFrameMuxer {
41-
private val frameUsec: Long = (TimeUnit.SECONDS.toMicros(1L) / fps).toLong()
41+
private val frameDurationUsec: Long = (TimeUnit.SECONDS.toMicros(1L) / fps).toLong()
4242

4343
private val muxer: MediaMuxer = MediaMuxer(path, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4)
4444

@@ -59,7 +59,7 @@ class SimpleMp4FrameMuxer(path: String, fps: Float) : SimpleFrameMuxer {
5959
// This code will break if the encoder supports B frames.
6060
// Ideally we would use set the value in the encoder,
6161
// don't know how to do that without using OpenGL
62-
finalVideoTime = frameUsec * videoFrames++
62+
finalVideoTime = frameDurationUsec * videoFrames++
6363
bufferInfo.presentationTimeUs = finalVideoTime
6464

6565
// encodedData.position(bufferInfo.offset)
@@ -78,6 +78,6 @@ class SimpleMp4FrameMuxer(path: String, fps: Float) : SimpleFrameMuxer {
7878
return 0
7979
}
8080
// have to add one sec as we calculate it 0-based above
81-
return MILLISECONDS.convert(finalVideoTime + frameUsec, MICROSECONDS)
81+
return MILLISECONDS.convert(finalVideoTime + frameDurationUsec, MICROSECONDS)
8282
}
8383
}

0 commit comments

Comments
 (0)