Repository navigation
fix(mux)!: refuse AAC channel counts no channelConfiguration names - #4973
Conversation
Co-authored-by: Grok 4.7 <noreply@x.ai>
Config::encode returns the error instead of logging and writing stereo. Catalog synthesis uses TryFrom so that refusal cannot be skipped. Co-authored-by: Grok 4.7 <noreply@x.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (11)
💤 Files with no reviewable changes (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review. WalkthroughAAC configuration encoding now returns an error when a channel count has no corresponding Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The AAC channel-count change has no identified merge-blocking issue; normal checks remain appropriate. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
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 |
|
Automated review: #4973 Summary: I checked the callers. The only non-test callers of Non-blocking
Tests cover counts 0–9 and 24, CI: green (Check, Test, Android, Swift, Windows, macOS, Quest). Verdict: MERGE (reviewed head This is an automated review, not the maintainer's decision |
…'t guess Configurations 11 (6.1) and 13 (22.2) name those counts, so the refusal is about picking a layout, not a missing configuration. Note that 8 channels always encode as configuration 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re the automated review:
(Written by Claude Opus 5.5) |
|
Automated review of #4973 at This is a clean, narrow fix. Non-blocking
Verdict: MERGE once CI is green. Coordinate the order with #4977 and #5014 (findings 1 and 2). 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: ed39510
No new actionable findings. The fallible encode/TryFrom path propagates unsupported counts, while verbatim ASC import avoids lossy re-encoding and preserves PCE layouts. Checked the changed caller conversions and decoder validation ordering. Direction: appropriate API correction; preserving original descriptions is essential for configurations a bare channel count cannot reconstruct.
Verification limits: complete static diff review; no workspace compilation/tests. The already-reported integration with #4977's encode rewrite still requires care. GitHub currently reports conflicts, so combined/post-resolution behavior is unverified.
…efusals # Conflicts: # quest/m1/README.md # quest/m1/aac-parse-truncated-sbr.md
Problem
moq_mux::codec::aac::Config::encodelogged an unsupported channel count and wrote an AudioSpecificConfig for stereo. A subscriber then played the wrong layout. The ADTS writer and@moq/hangalready refuse those counts.Approach
encodereturnsResultand refuses a count that does not pick a channelConfiguration: 1 through 6 stay that configuration, 8 channels stay configuration 7 (7.1), and every other count isError::UnsupportedChannelCount. Seven and 24 channels have configurations 11 and 13 but also program config element layouts, so no speaker layout is guessed.Catalog synthesis goes through
TryFrom, so a refused count cannot become a description. Importing a verbatim AudioSpecificConfig still keeps those bytes, including a program config element whose count encode cannot name.moq-audioalready rejects layouts without a channelConfiguration, and the decoder still checks profile, channel count, and sample rate before encode, so those errors stayError::Unsupported.Impact
Config::encodereturnsResult<Bytes, aac::Error>. Counts that do not pick a channelConfiguration returnUnsupportedChannelCountinstead of a stereo AudioSpecificConfig.From<aac::Config> for hang::catalog::AudioConfigis nowTryFrom. A successful conversion istry_into()?.Alternatives
channel_count. Making them private is a larger break thanResult.Fromthat drops the description on failure, as Opus encode does. This quest is to refuse the layout, not to publish a catalog that omits the config.Follow-ups
quest/m1/aac-parse-truncated-sbr): encode still writes a two-byte config for object types 5 and 29. Refuse or complete those fields in encode beforeparserejects them, or the round trip breaks.config()keeps the bytes, the decoder stops at stereo).encodestill masksprofileto 5 bits andsample_rateto 24 bits. Now that it is fallible, refusing those is a non-breaking addition.(Written by Grok 4.7)
Updated by Claude Opus 5.5 during merge: reworded the channel count error for 7 and 24 channels and noted the configuration 7 choice for 8 channels.
(Written by Claude Opus 5.5)