Repository navigation
Description
What happened?
I seeked into a PGS cue's span (or exactly onto a display-set start boundary) on a stream with no
acquisition point covering the landing.
Expected: the line the viewer landed on to be shown.
Instead: the landing-span line is never painted; the overlay stays empty until the next authored
composition arrives. Forced cues are affected too. Successor cues re-emit normally (fresh ids), so
everything AFTER the landing is fine — only the line you land on is lost. On sparse dialogue the
blackout runs tens of seconds.
Steps to reproduce
- Play a PGS stream whose lead-in to your landing point has no acquisition point / Epoch Start
(sparse-palette authored content, or a server-drained stream). - Seek to land mid-cue, or exactly on a cue's start boundary, or backward into cache-resident
content. - Observe the overlay: the landing-span cue is never (re)painted; the next authored cue paints
normally. A "first new cue after seek" instrument will look fine — it counts the NEXT cue, not
the missing landing line.
AetherEngine version or commit SHA
5.5.1 / 33565b2 (FFmpegBuild 2.0.0)
Host app
Custom / my own integration
Platform
tvOS
OS version
macOS 26.5.2 arm64 / tvOS 26.5
Device / chip
Apple Silicon Mac (arm64) + Apple TV 4K (3rd gen, 2022) / AppleTV14,1
Playback path
Native AVPlayer
Source media (for playback bugs)
PGS subtitle streams without acquisition points: authored fixtures (no APs / sparse palette
updates), a 660 s authored fixture, and a real server-backed session. MKV/HEVC video; the defect is
subtitle-side.
Error codes / log lines
No error is logged — that is part of the problem (the landing line is silently discarded).
Measured matrix:
- macOS: far-fwd mid-line (165 s) & backward into cache (22 s) drop the landing line 14/14
batteries; exact-boundary landing (seek to 120.0) drops it 13/14 (the 1 exception is a separate
mangled-timestamp fixture).
- 660 s authored fixture: 3/3 mid-line landings paint nothing, including the FORCED cue at 302 s.
- tvOS sim: seek→600 only the 605 s cue paints; seek→30 no cue within 8 s.
- tvOS hardware, server session: 30 s & 302 s landings → no cue within 8 s; 600 s landing → the
landing-span cue (598.515–600.517) never re-shown, next cue (pts 605) painted at 737 ms.
Anything else
Mechanism (a code read, offered as hypothesis): Sources/AetherEngine/Subtitles/
Issue100PGSStaleArrival.swift:82-97 — the post-seek reconstruction pass seeds its active-line
candidate "only from a self-contained composition" (an Acquisition Point / Epoch Start). With no
such composition in the lead-in, no candidate is seeded and the landing line is discarded.
Relation to existing issues: #100 (this lives in the gate built for that fix — the catch-up-burst
itself IS fixed; but for AP-less streams two statements in that thread don't hold as measured: the
seek-landing case is not byte-identical, and the held line doesn't show "a beat late" — it never
shows); #125 (NOT a regression — its 5.0.5 fix holds: successor re-emission 56/56, zero integrity
violations; this is the residual landing-span line); #112 ("shows the line currently being spoken
immediately" is exactly what the seek-landing case fails to deliver); #96 (dense-dialogue
first-cue-latency retests can't see this).
Aggravator: forced cues are affected and there's no per-cue forced flag on the engine surface
(only TrackInfo.isForced), so a host can't even detect a dropped forced line. (We're filing the
per-cue forced-flag API gap separately, in a related issue.)
Honest scope: our hostile shapes are authored (no APs / sparse). Full-palette BD rips with periodic
acquisition points were not swept — on real library content we have a hint the landing cue CAN
arrive — so we claim this for AP-less/sparse shapes, not all content.
Fix directions (offered): let the reconstruction pass fall back to seeding from the newest
decodable non-self-contained composition; or run the decoder from the nearest epoch start behind
the backscan window.
Version note: 5.5.1; no release 5.6.0–5.8.6 mentions PGS (post-pin subtitle work is
teletext/CEA-608), so we expect this holds at HEAD — happy to re-test. Dumps + engine-log sidecars
- the 660 s fixture available on request.
Activity
Merge fix/ae143-pgs-landing-line-seed: seed the seek-landing PGS line…
superuser404notfound commentedon Jul 19, 2026
Fixed in 5.9.3 via #149.
Your code read was spot on. The #112 reconstruction pass seeded its active-line candidate only from a self-contained composition (Acquisition Point / Epoch Start), so on AP-less/sparse-authored streams no candidate was ever seeded and the landing-span line was discarded, while the pass-ending successor published normally. That also explains the exact-boundary batteries: by the time the drain tick decodes the backscan, the playhead has advanced a few frames past the boundary, which turns the boundary landing into the mid-cue shape.
The fix is your first suggested direction: the candidate is now seeded from any successfully decoded composition behind the playhead. The drain decoder is rebuilt fresh at the backscan start, so a set whose palette/object references are missing fails decode and never reaches the gate, meaning anything that decodes is renderable, and the steady-state path outside reconstruction already publishes Normal compositions unconditionally. The #112 no-scroll invariant is unchanged (lead-in lines stay held; only the newest at/behind the playhead emits once the decode reaches the playhead).
Widening the seed exposed a second hole, also fixed: a PGS clear carries no cues and never reached the gate's admission, so a candidate cleared before the playhead kept its open placeholder window and would have resurrected as the active line at pass end. The per-composition trim broadcast now closes the candidate's window too, and a clear ahead of the playhead bounds the emitted landing line at the authored clear.
Covered by
Issue143PGSLandingLineTests(mid-cue landing, boundary landing with an advanced tick playhead, the no-scroll invariant on Normal-only content, cleared-line non-resurrection in both Normal and acquisition-point variants, ahead-clear trimming, candidate refinement); 6 of the 7 failed on 5.9.2.On your honest-scope note: this covers landing sets that are standalone-decodable (your authored fixtures, and any Normal set carrying its own PDS/ODS). Content whose landing sets truly depend on state from before the backscan window would need the epoch-start-aware backscan (your second direction); the PCS classification the gate receives is kept in place for exactly that, so if you have real content in that shape, a fresh issue with a sample would be the right vehicle. A retest on your 660 s fixture and the server-backed session would be very welcome.
cmcpherson274 commentedon Jul 20, 2026
fix(subtitles): seed the seek-landing line from any decoded compositi…
fix: keep all objects of a PGS multi-object display set; per-cue forc…
superuser404notfound commentedon Jul 20, 2026
Fixed in 5.15.2 (ddebe0e), and thank you for pinning the residual to successor-presence so cleanly.
Your read is exactly right. The reconstruction candidate's only emit path was the pass-end trigger in
admitDuringReconstruction: it flushes the held active line when a composition at or after the playhead decodes. A landing whose display set is the newest decodable composition in the drain window has no such trigger, so on the sparse and last-line shapes the candidate seeded (which is whyapplySubtitleEventfired with the landing cueStart) but never published, andreconstructingnever cleared. The publish/withhold split tracking successor-presence rather than landing kind or seek direction is precisely that.The fix gives the pass a successor-independent end. On each drain tick, once a candidate is seeded and nothing is stored ahead within the forward lead window (60 s), the drain finalizes the pass: it emits the candidate active line (the whole same-start group, so a forced sign and its dialogue both paint) once and clears
reconstructing. Your three repros are exactly this shape and now publish: the 160 last-composition landing, the 30.0 boundary landing with the next line 90 s out, and the 302 seek into the 300 to 304 forced cue with its neighbor ~296 s away. A line the author cleared before the playhead no longer covers it and is filtered out, so the no-resurrection invariant holds; landings that already had a successor in the window keep the existing path and are unchanged.On your completeness note (the 90 s line emitted with end=120 at the boundary landing): that is the emitted historical span closing at the pass boundary rather than the authored 95/100 clear, and as you observed it expires exactly at the landing playhead so it never draws. It is a separate, screen-invisible bookkeeping difference from the dark-overlay bug, and I have left it as is for now; if it ever surfaces visibly, a fresh issue with a dump would be the right vehicle.
A retest on the 660 s fixture and the server-backed session would be very welcome, and the dumps plus log excerpts you offered would be helpful if anything still looks off.
fix(subtitles): finalize PGS reconstruction pass with no successor to…
cmcpherson274 commentedon Jul 23, 2026
Re-ran the batteries at 5.20.2 (e2dcbb9): the 5.15.2 finalize is confirmed working for the
shapes it targets — measured on two new control cells:
280): now paints (was dark at 5.9.7);
now paints.
But all three shapes from my original residual report are still dark at 5.20.2, plus a
fourth (EOF): seek 165 into a 160→170 last line, seek 30.0 exactly onto 30→33 (next show
90 s away), seek 302 into a forced 300→304 cue (next show ~296 s away), seek 656 into
655→658. Same signature as before: applySubtitleEvent fires for the landing set, no cue
ever publishes (20 s settles; 5.9.7 side-by-side on identical fixture bytes).
The split between the fixed and still-dark cells is exactly the presence of the landing
line's own CLEAR display set inside the lead window. Reading 5.15.2's gate: the finalize
requires nothing stored ahead (store.entries(from: playhead, through: playhead+lead)),
and a stored zero-object clear satisfies that probe — while the pass-end trigger in
admitDuringReconstruction only fires when a composition decodes into the pass, which a
zero-object clear never does. A landing line followed only by its own clear (the normal
authored shape — nearly every line has one) falls between the two conditions and stays
held forever.
Repro is a two-line delta from the fixtures you already have: give the landing line a
clear inside the lead window (dark) vs. move the clear past the lead / drop it (paints).
My authored scenario + dumps available on request. Suggested read: a zero-object display
set probably shouldn't count as a "successor" for the finalize probe (it can't end the
pass), or alternatively the clear's decode could flush the candidate when its PTS is
after the playhead — either way the landing's end still trims to the clear.
fix(subtitles): anchor the prefetch seek on the subtitle axis (superu…