Skip to content

5.20.4 - Reliable VOD completion at phantom final boundaries

Choose a tag to compare

@superuser404notfound superuser404notfound released this 24 Jul 12:39

Fixed

VOD playback now reaches the real end of media when the final Cues-derived segment boundary has no matching runtime keyframe (#169).

Root cause

The natural forward producer correctly carried the remaining EOF media in the preceding segment, but the playlist still advertised a short final slot whose boundary had no runtime keyframe. No producer or restart anchor could create that slot, so AVPlayer waited at an impossible segment seam and eventually failed with -12889.

Fix

  • Fold a final plan slot shorter than the ordinary cut target into its predecessor.
  • Preserve the complete advertised duration and terminal PTS.
  • Use the collapsed plan consistently for engine state, provider construction, initial seek mapping, and producer startup.
  • Cover the observed 2.799 second tail and a long-GOP predecessor with regression tests.

Verification

983 tests in 162 suites passed. Strict Swift concurrency, macOS CI, iOS Simulator CI, and tvOS Simulator CI are green.

Status

Issue #169 remains open for the reporter to verify 5.20.4 on the affected Apple TV and media file.