Skip to content

4.6.1 — Hardening for in-band CEA-608 closed captions

Choose a tag to compare

@superuser404notfound superuser404notfound released this 27 Jun 05:39

Hardening for in-band CEA-608 closed captions (#77)

Two robustness fixes on the 4.6.0 closed-caption path, from post-merge review. Both are isolated to the CC tap and affect only in-band CEA-608 playback.

  • Concurrency. ClosedCaptionTap decoded on the producer pump thread with no lock, on the assumption of a single pump. The restart path abandons an old pump after a 5 s join timeout (HLSVideoEngine.performRestart), so an abandoned pump can briefly overlap the new one calling into the same tap, racing the (not-thread-safe) CEA608Decoder and the cue buffer. The tap now guards its decode state with a lock, mirroring NativeSubtitleCueStore (#55). Worst case during the rare overlap is a few garbled cues that self-correct on the next reset / EOC.
  • Seek. Seeking with closed captions active left the pre-seek caption on screen until the next caption decoded, because the CC seek path reset the tap but did not clear the mirrored cues. It now clears them immediately, symmetric with the side-demuxer subtitle path.

No change to any other codec or playback path. Build clean, 226 tests pass.

Full Changelog: 4.6.0...4.6.1