From 050e582366d26c6130d236d4a6f877b0271ecc5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 2 Dec 2024 18:12:12 +0200 Subject: [PATCH] mpegtslivesrc: Reset rate to 1/1 on disconts and flush observations Part-of: --- net/mpegtslive/src/mpegtslive/imp.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/mpegtslive/src/mpegtslive/imp.rs b/net/mpegtslive/src/mpegtslive/imp.rs index a25d7921..f37ff72d 100644 --- a/net/mpegtslive/src/mpegtslive/imp.rs +++ b/net/mpegtslive/src/mpegtslive/imp.rs @@ -461,6 +461,12 @@ impl State { new_pcr = MpegTsPcr::new(pcr); self.base_pcr = Some(new_pcr); self.base_external = Some(base_external); + imp.external_clock + .set_calibration(observation_internal, base_external, 1, 1); + // Hack to flush out observations, we set the window-size to the + // same value + imp.external_clock + .set_window_size(imp.external_clock.window_size()); self.discont_pending = true; } } else {