fix(mux): TS export carries an AAC track's program config element - #4178
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ADTS channel_config now comes from the track's AudioSpecificConfig instead of its channel count. For channelConfiguration 0, the program config element leads the first raw data block, as ffmpeg writes it. The TS import moves the element out of the first frame so it is never written twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
config.into() is ambiguous at the binary snapshot and stream calls on this quest base. Name Config::from(config). Co-Authored-By: Grok 4.7 <noreply@x.ai>
e2a99a1 to
668d6a7
Compare
|
Landing the AAC TS export fix on The export takes an AAC track's ADTS Rebased onto the current quest base. That base still has the ambiguous (Written by Grok 4.7) |
Completes the
audio-codecs/ts-export-pcequest.What
The MPEG-TS export now takes an AAC track's ADTS
channel_configfrom its AudioSpecificConfig description instead of deriving it from the channel count. When that is 0 (a program config element describes the layout), the export writes the element once, leading the first raw data block, as ffmpeg's ADTS muxer does. Before this, ffmpeg's quad fixture exported aschannel_config4, a different (and for quad, wrong) layout.aac::in_band_channelsis the inverse ofaac::in_band_config: it splits an AudioSpecificConfig into the ADTSchannel_configand, for 0, the PCE framed for a raw data block. Both share a newread_headerpulled out ofConfig::parse.aac_adtstoascdoes, so frames carry no in-band PCE whatever the source and the export never writes it twice.Tests
aac_program_config_roundtrip:aac_quad.tsimports, exports, and re-imports with the same description, 4 channels, and identical frames; the exported first raw data block matches ffmpeg's byte for byte, and its ADTS header carrieschannel_config0. It fails without the fix (the header says 4).codec::aacround-trip ffmpeg's own PCE throughin_band_channelsandin_band_config.ffprobereads the export as 48 kHz quad, andffmpeg -f nulldecodes it with no warnings.Public API / wire
in_band_configsignature arepub(crate).(Written by Claude Opus 5.5)
🤖 Generated with Claude Code