Preserve phase when sampling 50 fps from a 60 fps camera

This commit is contained in:
evgeny committed 2026-10-20 00:15:22 +02:00
1 parent 9bc3e7228c
commit 3db52c755c
3 files changed
+3 -3

No files matched your search

@@ -9,7 +9,7 @@ internal class CallVideoCadence(private val fps: Int) {
lastPts = pts
val scaled = pts * fps
if (next >= 0 && scaled < next - 250_000) return false
next = if (next < 0 || scaled - next > 250_000) scaled + 1_000_000 else next + 1_000_000
next = if (next < 0 || scaled - next > 1_000_000) scaled + 1_000_000 else next + 1_000_000
return true
}
}