Repository navigation
Description
What happened?
A PGS line that should be on screen at the seek destination is never shown when the line's own
zero-object CLEAR is the only display set after it and that clear sits beyond the 60 s lead
window. This is the exact shape you fixed in 5.15.2 for #143 ("a landing whose clear sits beyond
the 60 s lead: now paints") — it held from 5.15.2 through 5.23.10 and goes dark again in 5.23.11.
Fixture (synthetic, attached, authored-truth JSON included): PGS track with a show at 200.0 s,
its clear at 280.0 s (an 80 s line — nothing else stored between them), on a ~660 s file.
Seek to 210 s, i.e. land inside the line.
- 5.23.10 (b6724e4) and every release back through 5.15.2: the landing display set is decoded
and applied after the seek, and the line publishes with end == 280 exactly. - 5.23.11 (ad5497c): the landing display set is never delivered — no apply event, nothing ever
publishes at the destination. Deterministic, 3/3 runs.
Same machine, same day, same fixture bytes (sha256 13236b19…), same invocation for every leg;
only the engine revision differs. Bisected across 5.20.7 → 5.23.9 → 5.23.10 → 5.23.11: the break
lands exactly on 5.23.11, whose only subtitle-path change is the #230 side-reader park rework.
Log signature, post-seek forward prefetch on the same seek:
5.23.10: #151 forward prefetch started: streams=[1] startAt=210.40s lead=60.0s
#151 forward prefetch exited (cancelled=true) harvested=3
[applySubtitleEvent #2] cueStart=200.000s cueEnd=4295167.295s currentTime=210.4s
5.23.11: #151 forward prefetch started: streams=[1] pacing=0 startAt=210.30s lead=60.0s
#151 forward prefetch exited (reason=cancelled cancelled=true) harvested=1
(no applySubtitleEvent for the 200 s landing — it never arrives)
A hypothesis, offered loosely since you know this code and we don't: before #230 the reader ran
past the lead edge, which incidentally delivered both the landing set behind the seek point and
its far clear; with the park now paced by the NONKEY stream's DTS and held at the lead edge, the
landing display set at 200 s (behind the 210 s seek, its only successor 80 s ahead) seems to be
the packet that no longer gets delivered — harvested drops 3 → 1 on the same bytes. The
regression is upstream of the #143 finalize: the landing is never decoded at all, so the
finalize never gets its chance.
Happy to re-run any variant (different gaps, different seek offsets) if useful.
Steps to reproduce
- Use the attached b0-clearshape.mkv (synthetic PGS authored by our fixture tool; the attached
.sidecar.json is its authored truth). The relevant events: show at 200.0 s, zero-object clear
at 280.0 s, nothing between; next show at 598.0 s. - Open it on the native path with the PGS track selected (stream index 1, hdmv_pgs_subtitle).
- Seek to 210.0 s and wait ~20 s.
- Expected (5.15.2 … 5.23.10): the 200 s line is shown at the destination and publishes with
end 280. Actual (5.23.11): nothing is ever shown at the destination.
AetherEngine version or commit SHA
5.23.11 (ad5497c). Last good: 5.23.10 (b6724e4). Also verified good same-day on the same fixture bytes: 5.23.9, 5.20.7.
Host app
Custom / my own integration
Platform
macOS
OS version
macOS 26.5.2
Device / chip
Mac Studio (Apple silicon, arm64)
Playback path
Native AVPlayer
Source media (for playback bugs)
Attached: b0-clearshape.mkv — 8.8 MB synthetic MKV (320x180 video + one PGS track authored by
our PGS fixture tool; no commercial content). b0-clearshape.sup.sidecar.json is the authored
truth (display-set list with PTS + composition hashes).
Error codes / log lines
No error is raised anywhere — the landing simply never arrives. Side-by-side on the same seek:
5.23.10 (good):
[AetherEngine] #151 forward prefetch started: streams=[1] startAt=210.40s lead=60.0s
[AetherEngine] #151 forward prefetch exited (cancelled=true) harvested=3
[applySubtitleEvent #2] cueStart=200.000s cueEnd=4295167.295s engine.currentTime=210.400s
5.23.11 (bad):
[AetherEngine] #151 forward prefetch started: streams=[1] pacing=0 startAt=210.30s lead=60.0s
[AetherEngine] #151 forward prefetch exited (reason=cancelled cancelled=true) harvested=1
(no applySubtitleEvent for cueStart=200)
Anything else
- Bisection on identical fixture bytes, same machine/day: 5.20.7 good (2 runs), 5.23.9 good,
5.23.10 good, 5.23.11 dark (3 runs). - Checked every open issue and searched closed ones before filing — no existing report of this.
Closest threads: #151 subtitle prefetcher: the forward park is edge-triggered on subtitle packets only #230 (the park rework itself, closed on the code-level fix without a
symptom-level retest, which is exactly where this hides) and PGS: after the 5.15.2 #143 fix, a seek-landing line is still never shown when its own zero-object CLEAR is the only stored successor in the 60 s lead window (the common authored shape) — measured 5.20.2 #204 (the adjacent
within-the-lead shape you fixed in 5.20.6 — see my confirmation comment there). - Related good news from the same battery: the four shapes from the PGS: after the 5.15.2 #143 fix, a seek-landing line is still never shown when its own zero-object CLEAR is the only stored successor in the 60 s lead window (the common authored shape) — measured 5.20.2 #204/Loopback drainer: a seek landing mid-cue (or exactly on a display-set boundary) on a PGS stream without acquisition points never re-shows the landing line — including forced cues — until the next composition #143 family (clear
within the lead, forced landing, EOF landing, no-clear landing) all still publish correctly at
5.23.11 with ends exact — the 5.15.2 finalize and the 5.20.6 drain both look intact; what
changed is delivery of the landing set under the new park. - Full engine logs and machine-readable dumps for every version leg are available on request
(also attached if the form allowed it).
Activity
Merge pull request #236 from superuser404notfound/fix/issue-234-side-…
superuser404notfound commentedon Jul 28, 2026
Thanks for this one. A bisection across four releases on identical fixture bytes, with the harvested counts on both legs, pointed straight at the cause, and the authored-truth sidecar made it reproducible here without guesswork.
The park is not the problem, but it is the change that exposed it. The regression is in the positioning.
The prefetcher positions with
avformat_seek_file(ctx, -1, ...). A -1 stream index means libavformat picks the reference stream itself, inav_find_default_stream_index, and that score awards +200 to any stream withdiscard != AVDISCARD_ALL:Until 5.23.10 every non-subtitle stream sat at
AVDISCARD_ALL, so the subtitle stream was the only one collecting that +200 and won the vote 200 to 75. The seek was measured on the subtitle axis and landed on the last display set at or before the target, which is the landing set. #230 moved the pacing stream toAVDISCARD_NONKEY, which is notAVDISCARD_ALL, so video collects the same +200 and wins at 275. The seek now lands on the last video keyframe instead.On Matroska that is decisive:
matroska_read_seekjumps to the cluster byte position named by the reference stream's index entry, and anything in earlier clusters is never read. A landing set 10 s behind the destination is therefore behind the read head before the first packet is delivered, which is whyharvesteddrops to the single 280 s clear and why nothing publishes. The #143 seed and the #204 finalize never get their chance, exactly as diagnosed.One thing worth knowing for future fixtures: this class does not reproduce on MP4.
mov_read_seekre-seeks every stream individually and backwards, so a sparse subtitle track keeps its landing sample whatever the reference stream is. The #230 tests ran on an MP4 fixture, which is how they stayed green on a broken build.Fixed on main in 59530f8 (merged as f1c09cc). The anchor is now passed explicitly and the target is converted into that stream's own time base, so positioning no longer depends on which streams happen to be deliverable. The #230 park itself is unchanged. Regression coverage lives in
Issue234SideReaderSeekAnchorTestson a small purpose-built Matroska fixture carrying the reported shape at fixture scale (landing at 3 s running to 11 s, successor at 12 s, seek to 7.5 s): without the anchor the landing never reaches the store, with it both cues do. The#151 forward prefetch startedline now also carriesanchor=<index>next topacing=, so the axis a session positioned on is readable straight from the log.A release follows shortly. Leaving this open for the retest.
fix(subtitles): anchor the prefetch seek on the subtitle axis (superu…
fix(subtitles): anchor the native reader seek on the subtitle axis
cmcpherson274 commentedon Jul 28, 2026
Retested at 5.25.2 (cf164d8) on the same fixture bytes and invocation as the report: fixed.
The landing publishes at the destination on every run, with END equal to the authored clear PTS
exactly:
b0clear-210 (show 200.0 / clear 280.0, seek to 210): published, end=280, 3/3 runs
(5.23.11 on these same bytes: nothing published, 3/3)
The new anchor= field makes it readable straight from the log, exactly as you said — stream 1 is
the PGS track here:
5.23.11: #151 forward prefetch started: streams=[1] pacing=0 startAt=210.30s lead=60.0s
-> harvested=1, no applySubtitleEvent for the 200 s landing
5.25.2: #151 forward prefetch started: streams=[1] pacing=0 anchor=1 startAt=210.30s lead=60.0s
-> [applySubtitleEvent #2] cueStart=200.000s cueEnd=4295167.295s currentTime=210.900s
No regression anywhere else in the battery: the four shapes from the #143/#204 family (clear
within the lead, forced landing, EOF landing, no-clear landing) and the second control all still
publish with ends exact at 5.25.2.
Two notes of thanks rather than business:
Our stated mechanism was wrong and yours is obviously right — we blamed the park for withholding
the packet, when the packet was positioned past. The av_find_default_stream_index +200 detail
(subtitle winning 200-75 until the pacing stream made it 275) explains the harvested 3 -> 1 drop
exactly, and it is not something we would have found from the outside.
The MP4-vs-Matroska point is the most useful thing we have read in a while, and we have written it
into our own fixture guidance: mov_read_seek re-seeking every stream individually means an MP4
suite simply cannot see this class, so seek-positioning coverage has to be Matroska. That is why
this only surfaced against a Matroska battery.
Good to close from our side.
superuser404notfound commentedon Jul 28, 2026
Retest noted, closing it here. Thank you for the bisection: four releases on identical fixture bytes with the harvested counts on both legs left exactly one candidate, and the authored-truth sidecar meant the landing set could be checked against the file rather than against a reading of the render. That is what turned this into a same-day root cause instead of a week of instrumentation.
Two notes on ground that moved since the report.
runNativeSubtitleReaderscarried the same missing anchor, but not as a regression. There theseekBoundedruns beforediscardAllStreamsExcept, so at seek time every stream is still at DEFAULT, all of them collect the +200, and video wins on its own +75. There was never an accidental subtitle anchor for #230 to take away; that path has behaved this way since the readers existed. Fixed in 9367748 and shipped in the same 5.25.2 you tested, so both readers now pass the anchor explicitly and log it.One residual worth knowing if you keep extending the Matroska battery: on a source whose subtitle track carries no cue points, the anchored seek falls out of
matroska_read_seekintoseek_frame_genericand scans forward fromdata_offset. The seek budget and the byte estimate bound it, so it is not unbounded, but on the native reader path that is new behavior (the prefetcher has run that way since 5.9.7). If a native reader ever takes an odd amount of time to start on an exotic MKV, that is the first place to look.The container point went into the changelog entry for the same reason you wrote it into your fixture guidance: an MP4 suite cannot see this class at all, so seek positioning coverage has to be Matroska. #230 stayed green on a broken build precisely there.
fix(subtitles): give the video path priority on the source link