Repository navigation
fix(mux): repeat the AAC program config over TS and stop it gating the catalog - #4983
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e catalog TS export now writes an AAC program config element in the first frame after each PAT/PMT instead of the first frame only, so a receiver that tunes in or an export that rewinds can decode PCE-described layouts such as quad. Import strips a repeated element from each frame, since the description carries it, and refuses one that changed mid-stream. An AAC stream whose first frame lacks the element (a late join to an ffmpeg source) now releases its catalog reservation, so the rest of the program publishes at once; the track joins when an element arrives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Background agent run: the quest is implemented and (Written by Claude Opus 5.5) |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Grok review of The export repeats the PCE right after each PAT/PMT, which is where a receiver can start anyway. The import stops a PCE-less AAC track from holding back the catalog, re-reserves the track when a PCE finally shows up, and strips repeated PCEs so round trips stay byte-exact. I checked the flag handling in Non-blocking
Verdict: MERGE once CI is green. This is an automated review, not the maintainer's decision |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
On the review of
(Written by Claude Opus 5.5) |
|
Grok follow-up review of The new Earlier findings
Non-blocking
Verdict: MERGE once CI is green. This is an automated review, not the maintainer's decision |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: bd780dd
No new actionable findings. Checked PSI-triggered repeat flags, cloning before clearing the current flag, kind rebuilding, release/reacquisition of catalog reservations, and repeated-PCE removal. Direction: fixes late-join catalog gating and makes exported PCE audio discoverable after table refreshes. The existing decision to reject only the changed PES, and byte-exact comparison including comments, remain the documented tradeoffs.
Verification limits: complete static diff and AacStream context; no ffmpeg decode, resume integration, or Rust test run. GitHub currently reports conflicts.
Completes
quest/m1/ts-aac-pce-join.md.Summary
AAC whose layout lives in a program config element (ADTS
channel_config0, e.g. quad) now survives mid-stream joins and resumes over MPEG-TS.ts/export.rs): the PCE now goes in the first AAC frame after each PAT/PMT. Before, it went in the first frame only, andrewind()/resume()and late receivers never saw it. A receiver can only demux from a PAT/PMT anyway, so this is the earliest point it could decode. It costs one PCE per table interval (500 ms or video keyframe) instead of one per frame.Kind::Aackeeps its element and gets arepeatflag. A rebuilt kind (catalog update) also repeats it, so an update between the tables and the next frame can't drop it.ts/import.rs): if the first frame has no PCE (a late join to an ffmpeg source), the importer releases that track's catalog reservation. The rest of the program then publishes right away instead of waiting on the AAC track. When a PCE does arrive, the track reserves again and joins the catalog. On later frames, a repeated PCE is stripped because the description already carries it, so round trips stay byte-exact. A PCE that differs from the description is refused as a damaged unit.doc/bin/cli.md): say that export repeats the element, and that a late join to an ffmpeg source plays without that AAC track.Checked with ffmpeg 9.0.1 on a 3 s quad source:
Decode error rate 1 exceeds maximum). That failure is what the late-join docs describe.Tests
import::test::aac_joined_after_its_program_config_publishes_the_rest: video plus a PCE-less AAC start publishes the catalog with video alone, then adds the 4-channel AAC track once a PCE arrives, with the element stripped from every frame. It fails without the reservation release (the catalog is withheld).import::test::aac_program_config_changed_mid_stream_refuses_the_unit: a PCE that moves a channel pair from back to side refuses its unit as damaged, and the frames around it publish. It fails if the changed PCE is stripped instead.export_test::aac_program_config_follows_each_table: every AAC PES after a PAT carries the PCE and no other PES does, including after a discontinuity marker rewinds the clock. The output cut at the second PAT imports as the same quad track.just checkpasses.Public API / wire
Decisions (settled by the maintainer)
Suggested follow-ups
dropped a damaged TS unitand incrementsdamaged, forever. Recommendation: plan a small quest to log this "waiting for a program config" state once per PID rather than count it as damage.channel_configafter the importer is built are never checked against its config. fix(moq-mux): HE-AAC catalog entries name the output, not the LC core #4977 deletesquest/m1/he-aac-catalog-output.md, so this needs its own quest, refusing changes the same way. It would also cover the frames after a changed PCE: an ffmpeg-style source writes the PCE once, so only that unit is refused today and the bare frames after it decode against the old layout.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)