From 004405e868d5ae62b0b98c76a73858e3a0d25ba6 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Wed, 10 May 2023 11:47:18 +0700 Subject: [PATCH] Correct delta on buffer schedule --- src/rtsp/gst/sender.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rtsp/gst/sender.rs b/src/rtsp/gst/sender.rs index 4eee4de..900937a 100644 --- a/src/rtsp/gst/sender.rs +++ b/src/rtsp/gst/sender.rs @@ -255,10 +255,10 @@ impl NeoMediaSenders { let end_time = self.buffer.end_time(); let frame_time = data.time; - // Ocassionally the camera will make a jump in timestamps of about 15s - // This could mean that it runs on some 15s buffer + // Ocassionally the camera will make a jump in timestamps of about 15s (on sub 9s on main) + // This could mean that it runs on some fixed sized buffer if let Some(end_time) = end_time { - let delta_time = end_time - frame_time - 1; + let delta_time = frame_time - end_time - -1; let delta_duration = Duration::from_micros(delta_time.unsigned_abs()); if delta_duration > Duration::from_secs(1) { debug!(