Skip to content

After a re-aimed restart the producer serves in ~2 s but AVPlayer stops requesting, so the landing waits out 5 s park detection plus 6 s re-engage grace #421

Description

@superuser404notfound

Split out of #408, whose retest confirmed both halves of the wait it was opened for. Reported and measured by @rrgomes on 6.40.0 / 6.41.0, h264 MKV whose Cues mark non-random-access points, PGS on, Apple TV 4K 3rd gen (tvOS 26.6) and macOS 26.6.2, 2026-08-24/25.

What happens

After a restart whose gate re-aimed, the producer serves its first segment in about two seconds, and then AVPlayer stops requesting. The landing waits out the ladder instead: 5 s of park detection plus 6 s of re-engage grace. Two of the three re-aimed landings in the retest did this; the third never parked, and there is no discriminator yet for which do.

Apple TV, seek#1 to 15.00, 11.94 s in total:

21:08:46.884 seek#1 programmatic began target=15.00
21:08:52.498 [HLSSegmentProducer] #65 backpressure WEDGE BROKEN (advance) head=15 target=5 cacheTarget=4 parked=5s (fast path: fetch target + rendered clock both frozen)
21:08:52.503 [HLSVideoEngine] #65 backpressure wedge: re-anchoring producer to 15.00s -> seg3 (requested seek target; frozen clock 5.09s) (attempt 1/5)
21:08:58.508 [HLSVideoEngine] #65 consumer re-engage: no segment fetch for 6s after wedge re-anchor (pos=5.09s); asking host to nudge AVPlayer
21:08:58.748 seek#1 programmatic landed rendered=15.00 target=15.00

Mac, seek#9 to 147.60, 15.75 s in total: seg35: served 44291341 B (wait=1939.1ms cache=26 restarted=true) at +1.9 s, then no further GET; WEDGE BROKEN ... parked=5s at +9.5 s, producer restarted at idx=36 and re-aimed, gate open at +9.9 s, segments 36 to 44 rebuilt by +13.2 s; consumer re-engage: no segment fetch for 6s at +15.5 s, nudge, landed at +15.75 s.

Why it is worth its own issue

The wait #408 was opened against is gone: fifteen seeks into resident content landed in 0.05 to 0.23 s on the same asset that used to sit 12 to 27 s. But from a viewer's seat the complaint is unchanged whenever this fires, because the number is the same size and arrives by a different route. The producer is not the blocker here; it has already served. Both timers are worst-case detection budgets sized for a consumer that might still be working, and neither is measuring whether this one is.

Questions this needs answered before a fix

  • What separates a re-aimed restart whose consumer parks from one whose consumer does not. The third landing (seek#2 to 205.00, 6.90 s) went through the same re-aim and never parked.
  • Whether the park is a consequence of the re-aim at all, or of the restart, in which case it predates 6.40.0 and the retest simply gave it a clean shape to be seen in.
  • Whether the 5 s park detection can be earned back with a signal rather than a timer: the producer knows it served, and the provider's fetch counter knows AVPlayer went quiet, so the pair is a fact rather than a wait.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions