Repository navigation
fix(mux): keep access unit delimiters before injected parameter sets - #6001
Conversation
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
…ty/aud-first # Conflicts: # rs/moq-mux/src/container/ts/export.rs
The TS writer already knows its codec from the stream type, so only from_length_prefixed, whose signature carries no codec, infers it from the injected parameter-set header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 29 minutes. View limit details
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 |
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. |
Problem
Keyframes beginning with an access unit delimiter (AUD) currently export parameter sets before the AUD, violating Annex B ordering.
Closes #5951.
Approach
Keep the leading AUD before injected parameter sets in both the TS writer and the shared Annex B conversion used by elementary exporters, RTC, and the video decoder. The TS writer passes the codec it knows from the stream type;
from_length_prefixed, whose signature carries no codec, identifies it from the injected parameter-set header so an H.265 slice header is never mistaken for an H.264 AUD. Payloads without a leading AUD keep their existing allocations and bytes.Add regressions for both writers and codecs, all length-prefix widths in the shared converter, non-keyframes, prefixless conversion, and overlapping codec headers. Remove the completed quest.
Impact
take_delimiterandInBandCodec::of_parameter_setare crate-private.Alternatives
Inferring the codec only from the payload can mistake an H.265 slice for an H.264 AUD. Rebuilding a shared parameter prefix in the TS path adds an unnecessary allocation.
Decisions (iterate round)
No maintainer decision was given for this round; each choice took the recommended option.
take_delimiterlearns the codecInBandCodec; the TS writer passes its stream type's codec and onlyfrom_length_prefixedinfers it from the prefix header (recommended: the type names the codec, and the inference lives where it is needed)origin/mainints/export.rsvideo_es_payload_keeps_aud_firstand drop the AC-3 jitter test that feat(moq-mux): import private PES whole as pesPacket tracks #5921 deleted on main (recommended: main removed it deliberately)Follow-ups
annexb::length_prefixed_to_annexbis now only used by its own tests. Removing it is a public API break, so it belongs in a separate change.Checks
just checkat adaced1 through the Nix dev shell after mergingorigin/main(3,529 workspace tests).just test interop --publishers rust,python,go,cpp --subscribers rust,python,go,cpp,js-native-node,js-native-bun,c,gst --timeout 30. Browser-inclusivejust test interop --allwas blocked locally (pinned Chromium cannot launch without libglib). This change touches no wire, FFI, or gateway code.(written by GPT-6.1-Sol, updated by Claude Opus 5.5)
🤖 Generated with Claude Code