You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sequential EVENT startup: the playlist is held for 2 published durations (= 3 segment opens) and the spacing scan spends the origin's non-replayable prefix #370
On a slow or stalling origin, a sequential-origin session (AetherEngine 6.25.1, tvOS 26.6, Xtream timeshift .ts) never starts: AVPlayer's first /media.m3u8 GET is held for the full 30 s startup wait and the asset load times out (NSURLError -1008 / CoreMedia -12884) even though two segments were already produced and ~12 s of media sat on disk:
The gate demands 2 published durations, which takes 3 ledger opens.waitForSequentialStartupSegments reuses LiveEdgePolicy.minStartupSegments = 2, a live sliding-window constant (its doc comment guards against -12888 on a window whose holdback can't fit). On the append-only EVENT playlist a segment's EXTINF only becomes final when the next segment's ledger opens (real duration = nextStart − start), so N published durations require N+1 segment opens: the gate effectively waits for ~3 segments ≈ 12-18 s of media through a possibly-throttled origin. A one-segment EVENT playlist is legal HLS, and this playlist already carries the refresh counter tag that defeats AVPlayer's unchanged-playlist patience — the live rationale does not apply.
The keyframe-spacing scan spends the origin's prefix before the pump even starts. For the uniform-stride fallback plan, measureKeyframeSpacing first seeks — a silent no-op on a non-seekable sequential pb — then consumes up to 20 000 packets / 30 s of content from the single byte-0-only connection. Those bytes never reach the pump, so the session starts late and silently drops the archive's first GOP(s). Both field cases ended in max(4.0, measured) = the 4 s floor anyway (measured 0.480 s and 2.000 s), so the scan bought nothing.
Proposed fix (PR follows)
Serve the sequential EVENT playlist from its first finalized segment (sequentialStartupSegments = 1, leaving LiveEdgePolicy untouched), and release the held startup GET immediately when the pump dies before publishing anything.
Not proposed: publishing a segment before its successor opens. The append playlist exists because plan-EXTINF lies, published EVENT entries must not mutate, and capture/duration-known already coincide at the earliest knowable moment — the lag is inherent; the fix is to stop demanding two of them before serving.
Released in 6.25.2, together with #368 and #369, and both consumers are pinned to it. It carries the merged PR plus the follow-up noted in #373: every VOD failure surface releases a held startup GET now, not only the two on this trace, and the gate counts entries the playlist can actually advertise. Leaving this open for a device retest against the new pin.
Fixed by #373, released in 6.25.2 (plus the follow-up releasing the startup gate from every VOD failure surface and counting advertisable segments). Device-verified on Apple TV 4K, tvOS 26.6: replay startup now serves the EVENT playlist from the first finalized segment, and a session whose origin stalls fails fast to the client instead of holding the playlist GET for the full 30 s.
Activity
fix(video): serve a sequential EVENT playlist from its first finalize…
fix(video): plan a sequential origin without spending its prefix on t…
fix(video): every VOD failure surface releases the startup gate, and …
Merge fix/370-followup: the startup-gate release belongs to the failu…
superuser404notfound commentedon Aug 14, 2026
Reopening until the retest lands: the fix is merged but unreleased, so nothing has been confirmed on a device yet.
superuser404notfound commentedon Aug 14, 2026
Released in 6.25.2, together with #368 and #369, and both consumers are pinned to it. It carries the merged PR plus the follow-up noted in #373: every VOD failure surface releases a held startup GET now, not only the two on this trace, and the gate counts entries the playlist can actually advertise. Leaving this open for a device retest against the new pin.
tschuegy commentedon Aug 14, 2026
Fixed by #373, released in 6.25.2 (plus the follow-up releasing the startup gate from every VOD failure surface and counting advertisable segments). Device-verified on Apple TV 4K, tvOS 26.6: replay startup now serves the EVENT playlist from the first finalized segment, and a session whose origin stalls fails fast to the client instead of holding the playlist GET for the full 30 s.
fix(planning): anchor a uniform plan's segment 0 on the first IRAP th…
fix(planning): anchor a uniform plan's segment 0 on the first IRAP th…