Skip to content

5.0.2

Choose a tag to compare

@superuser404notfound superuser404notfound released this 11 Jul 18:51

Patch release.

Fixed

  • Embedded SRT cues no longer duplicate after rapid seeking (#121). The overlay drainer rebuilds the EmbeddedSubtitleDecoder on every seek (.resetAndDecode), which restarts its per-instance dedupe set and cue-id counter at zero. Because subtitleCues is intentionally retained across the seek, the backscan re-decoded cues still in the store, and the insert path only replaced same-start bitmap cues while always appending text cues. Identical lines therefore accumulated (a report saw the retained count grow 4 to 7 to 11) and the reset decoder ids collided with retained ids, so SwiftUI logged ForEach(id:) "the ID N occurs multiple times" and rendered duplicate overlays.

    Both invariants now live at the retained-store insert funnel, which sees the whole session rather than one decoder generation:

    • a text cue already present with the same start, end, and text is dropped (content, not id, so simultaneous distinct speaker lines and genuine repeats at new timestamps still insert), and
    • every cue that lands is stamped with a session-monotonic id, so ids stay unique regardless of how often the decoder is rebuilt.

    The PGS bitmap same-start replace (#112) is unchanged.

Thanks to wunax for the source-level diagnosis and the exact reproduction.

Full Changelog: 5.0.1...5.0.2