Skip to content

fix(vod): fold unproducible final plan segment - #206

Merged
superuser404notfound merged 1 commit into
mainfrom
fix/issue-169-forward-eof-tail
Jul 24, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
fix/issue-169-forward-eof-tail

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Root cause

The 5.20.1 PTS gate correction fixed tail starts, but the natural forward producer still cannot create the final advertised slot when the planned Cues boundary has no runtime keyframe. It reaches EOF after carrying the remaining media in the preceding segment, while the VOD playlist still advertises an extra terminal segment. AVPlayer then waits at that impossible seam and eventually reports -12889.

Fix

  • Fold a final plan slot shorter than the normal 4 second target into its predecessor.
  • Preserve the total duration and terminal end PTS while removing the unrecoverable boundary.
  • Use the collapsed plan consistently for engine state, provider construction, initial seek mapping, and producer startup.
  • Add AE#169 regressions for the observed 2.799 second tail and for a long-GOP predecessor.

Verification

  • swift test: 983 tests in 162 suites passed
  • swift build -Xswiftc -strict-concurrency=complete: passed
  • tvOS Simulator build: passed
  • Independent code review: no remaining findings

Refs #169

Remove a terminal VOD boundary when its final slot is shorter than the normal segment target. The producer already carries that EOF tail in the preceding segment when no runtime IRAP exists at the planned boundary.

Ensure the collapsed plan is the single value used by the provider, initial seek, and producer startup.

Refs #169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant