OrbiSubs SRT: rebase on the real delay against arrival, not on the lateness against the schedule

After the ecuadortv source reset its PTS (2026-11-23 17:50 UTC) the base shifted by the
lateness (11.9 s) and segments kept leaving 0.3 s after arriving instead of 9.5 s. The
lateness stayed under the 1 s threshold, so it never corrected, and 608 lost ~70 % of cues.
Logs retraso_real_s per segment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
guy
2026-11-23 15:41:56 -03:00
parent 575a150d7c
commit 8d6aafccc2
2 changed files with 27 additions and 5 deletions
+6
View File
@@ -119,6 +119,12 @@ class Reloj(unittest.TestCase):
e.agregar((124544.9, 124547.4, "pacientes y trabajamos"), 29095.0)
self.assertAlmostEqual(e.cola[0][0], 124544.9 - S.WRAP_S, places=3)
def test_falta_retraso(self):
# ecuadortv 2026-11-23 17:50: después del corte salía 0,3 s después de llegar.
self.assertAlmostEqual(S.falta_retraso(0.3, 9.5), 9.2)
self.assertLessEqual(S.falta_retraso(9.5, 9.5), 1.0) # normal: no se corre
self.assertLessEqual(S.falta_retraso(12.0, 9.5), 1.0) # de más: tampoco
def test_al_audio(self):
import orbisubs as O
tr = type("T", (), {"t0": 0.0, "fin": lambda self: 124547.2})()