Skip to content

fix(audio): read TrueHD Atmos from the major sync when the probe never reached the track (7.40.1) - #838

Merged
superuser404notfound merged 2 commits into
mainfrom
fix/truehd-late-start
Oct 18, 2026
Merged

superuser404notfound merged 2 commits into
mainfrom
fix/truehd-late-start

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

A TrueHD track whose first packet lies beyond the probe window kept AV_PROFILE_UNKNOWN, so objectAudioRendering played 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.4 at the tvOS probe budget:

start without the check with it
0 s profile=-99, E-AC-3 Atmos, 2599 packets, 44.7 MB, 679 ms, apac.31.03, CHANNELS="12"
926.8 s profile=-99, E-AC-3 Atmos, 10 packets, 267 KiB, 30 ms

TrueHDMajorSyncTests cover 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

Vincent Herbst and others added 2 commits October 18, 2026 18:38
…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
@superuser404notfound
superuser404notfound merged commit 93d54e5 into main Oct 18, 2026
4 checks passed
@superuser404notfound
superuser404notfound deleted the fix/truehd-late-start branch October 19, 2026 09:09
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