diff --git a/tools/chatgui-android/app/src/main/java/com/utun/chat/data/CallVideoCadence.kt b/tools/chatgui-android/app/src/main/java/com/utun/chat/data/CallVideoCadence.kt index ec359994..659432cf 100644 --- a/tools/chatgui-android/app/src/main/java/com/utun/chat/data/CallVideoCadence.kt +++ b/tools/chatgui-android/app/src/main/java/com/utun/chat/data/CallVideoCadence.kt @@ -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 } } diff --git a/tools/chatgui/src/call_video_cadence.h b/tools/chatgui/src/call_video_cadence.h index 7ac3ca44..eab0c3ab 100644 --- a/tools/chatgui/src/call_video_cadence.h +++ b/tools/chatgui/src/call_video_cadence.h @@ -13,7 +13,7 @@ public: lastPts = pts; const int64_t scaled = pts * fps; if (next >= 0 && scaled < next - 250000) return false; - next = next < 0 || scaled - next > 250000 ? scaled + 1000000 : next + 1000000; + next = next < 0 || scaled - next > 1000000 ? scaled + 1000000 : next + 1000000; return true; } }; diff --git a/tools/chatgui/tests/test_call_camera_capture.cpp b/tools/chatgui/tests/test_call_camera_capture.cpp index 10f5ae84..e44d61dd 100644 --- a/tools/chatgui/tests/test_call_camera_capture.cpp +++ b/tools/chatgui/tests/test_call_camera_capture.cpp @@ -118,7 +118,7 @@ private slots: qputenv("UTUN_CAMERA_TEST_LOG", path.toUtf8()); } void captureCadence() { - for (int input : {50, 100, 330}) for (int output : {30, 50, 60}) { + for (int input : {50, 60, 100, 330}) for (int output : {30, 50, 60}) { if (output > input) continue; CallVideoCadence cadence(output); unsigned accepted = 0; for (int i = 0; i < input * 3; ++i) if (cadence.accept(1000000 + i * 1000000ll / input)) ++accepted;