Repository navigation
fix(audio): read TrueHD Atmos from the major sync when the probe never reached the track (7.40.1) - #838
Merged
Conversation
…r reached the track A TrueHD track that starts after the probe window (John Wick: Chapter 2, TrueHD from 22 s, 45.8 MB in) leaves find_stream_info without a decoded frame, so the stream keeps AV_PROFILE_UNKNOWN and objectAudioRendering played it through the channel bridge. When object rendering is wanted and the profile is unknown, the engine now peeks the track's packets where the first producer starts and reads the major sync the way mlpdec does (four substreams, top bit of substream_info). Measured with the tvOS probe budget (16 MiB / 10 s): from the start 2599 packets, 44.7 MB, 679 ms; on a resume 10 packets, 30 ms; APAC 7.1.4 in both, where the same build without the check served E-AC-3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
…hen the probe misses the track Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
This was referenced Oct 22, 2026
pkajaba
pushed a commit
to pkajaba/AetherEngine
that referenced
this pull request
Oct 25, 2026
…X bed test, no pause on HDMI, stale packet and the APAC anchor, DV P5 local stills Before merge: 1. SoftwareAtmosRouteTests.apacRoutes takes .l714 for DTS:X (main renders DTS:X only into a bed that carries it one to one) and a new test pins that every other bed stays PCM while TrueHD Atmos renders into any. The software host now logs why a TrueHD or DTS track stays on PCM (SoftwareAtmosRoute.apacRefusal), as it already did for E-AC-3. 2. Route removal pauses only for outputs a viewer takes away: headphones, Bluetooth (A2DP, LE, HFP), AirPlay and USB, spelled as AVAudioSession.Port raw values (checked against the session on iOS / tvOS). HDMI is out, so an ARC / eARC receiver toggling on an Apple TV keeps playing. 3. A pre-seek audio packet can no longer anchor the APAC bridge: SoftwareAudioProducing gains the AE#492 feed epoch, the demux loop reads it before the read, and SoftwareAPACProducer checks it under the same lock as flush()'s startSegment. 4. A local software session reports supportsCacheBackedStills false for a Dolby Vision Profile 5 / 10.0 stream without the DolbyVisionStillReshaping trait (FrameDecodeContext.yieldsStill). Follow-ups on the FEL + TrueHD Atmos path: - The demux loop's "decoder not recovering" clock fallback uses the producer's own first-buffer budget; the APAC producer's is the bridge's dead-decoder bound, since its first packet is about 100 TrueHD access units in and the old 50 sent every TrueHD load to the video-anchored clock. - The software host resolves a TrueHD track whose profile the probe missed from its major sync, sharing HLSVideoEngine.trueHDMajorSyncVerdict with the loopback route (superuser404notfound#838). CHANGELOG: route removal and the setRate(0) interruption change are listed; the software-host Atmos entry drops `aetherctl play --atmos-bed` (main has it). Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A TrueHD track whose first packet lies beyond the probe window kept
AV_PROFILE_UNKNOWN, soobjectAudioRenderingplayed it through the channel bridge. Found on John Wick: Chapter 2 (TrueHD from 22 s, 45.8 MB into the file) on an Apple TV with the tvOS probe budget (16 MiB / 10 s).With rendering requested and the profile unknown, the engine now peeks the track's packets where the first producer starts and reads the major sync the way mlpdec does (four substreams, top bit of
substream_info), then marks the stream Atmos. Peeked packets are not consumed; budget 8192 packets / 64 MiB, otherwise the channel bridge as before.Measured with
aetherctl serve --atmos-bed 7.1.4at the tvOS probe budget:profile=-99, E-AC-3apac.31.03, CHANNELS="12"profile=-99, E-AC-3TrueHDMajorSyncTestscover a real Atmos and a real non-Atmos major sync, a sync in a later access unit, a packet without one, and malformed headers. Full suite green (XCTest 779, swift-testing 4689).Includes the 7.40.1 prep commit.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS