Skip to content

fix(audio): keep the Atmos confirmation pass off one-request origins - #841

Merged
superuser404notfound merged 1 commit into
mainfrom
fix/atmos-confirmation-serial-origin
Oct 19, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
fix/atmos-confirmation-serial-origin

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

LoadOptions.confirmAtmos opens one side demuxer per E-AC-3 track. On an origin limited to one request each of its reads (head, Matroska Cues at the tail, paced clusters) takes the pump's only slot. StreamX measured it on iPad behind an Xtream origin that refuses a second connection with 509: stalls every ~10 s on a 4K DV remux with 17 E-AC-3 tracks, AVPlayer -12889 then -15628, and the pass never logged its summary. Titles without E-AC-3 played clean in the same session.

  • Decline the pass when the origin requires serial requests, and for sequentialOrigin / heldSourceConnection (same set as the I-frame rendition, AE#682). One [AtmosConfirmation] skipped: ... line names the reason.
  • Re-check the budget before every track, so a limit the engine learns from 429/503/509 mid-session stops the remaining passes.
  • Emit the summary on every exit: stopped (<reason>) after k of n E-AC-3 track(s), confirmed JOC on ....

Not done: routing the pass through SideReaderLinkArbiter. With one slot the pump almost never parks long enough for a pass that needs a tail Cues read plus cluster reads, so yielding would just defer it forever, and declining is the honest version of that.

Tests: AtmosConfirmationOriginGateTests (gate + both summary shapes), existing Atmos suites green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS

Each E-AC-3 track's confirmation pass opens a second handle on the
source (head, Matroska Cues at the tail, paced cluster reads). With
maxConcurrentSourceRequests = 1 every one of those reads takes the
video pump's only slot, the pump overcommits past the pacer, and an
origin that enforces one connection (Xtream, HTTP 509) punishes it:
stalls every ~10 s on a 4K remux with 17 E-AC-3 tracks, and the pass
never reached its summary line.

Decline the pass on a serial origin, sequentialOrigin and
heldSourceConnection (the set the I-frame rendition declines), re-check
the budget before every track so a limit learned from refusals stops
it mid-pass, and log the summary on every exit with how far it got.

Reported by the StreamX integrator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
@superuser404notfound
superuser404notfound merged commit 35db225 into main Oct 19, 2026
4 checks passed
@superuser404notfound
superuser404notfound deleted the fix/atmos-confirmation-serial-origin branch October 19, 2026 10:06
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