Conversation
WalkthroughAdds support for a new Rtng atom type. Introduces a public 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/moov/udta/rtng.rs`:
- Around line 61-68: Test formatting for the Rtng assert fails rustfmt — run
rustfmt (cargo fmt) and update the formatting around the assert_eq! comparing
the Rtng struct so it matches rustfmt's expected layout (ensure proper
indentation, trailing commas, and alignment for the Rtng { entity, criteria,
language, rating_info } literal used in the assert_eq!); target the Rtng struct
literal and the assert_eq! invocation to normalize spacing/line breaks.
🧹 Nitpick comments (1)
src/moov/udta/rtng.rs (1)
38-43: Validate language codes to avoid silent truncation.
language_code(&self.language)only uses the first three UTF-16 code units; longer strings will be truncated. If the spec requires ISO‑639 3‑letter codes, please validate length/charset and return an error for invalid inputs.
This is from 3GPP TS 26.244 or ETSI TS 126 244 Table 8.7
07bb192 to
3b199b7
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/moov/udta/rtng.rs`:
- Around line 12-45: The rtng atom is a FullBox and must read/write the 4-byte
FullBox header (8-bit version + 24-bit flags) before the
entity/criteria/language; update decode_body_ext and encode_body_ext on Rtng to
consume/emit those bytes. In decode_body_ext call u8::decode to read the version
and then read the 3 flag bytes (or decode a u32 and mask off the low 24 bits)
before decoding entity/criteria/language, validating or ignoring the values
(spec expects 0). In encode_body_ext write a zero version byte and zero 24-bit
flags (emit 4 zero bytes) before encoding self.entity, self.criteria, language
code, and rating_info so the FullBox header is present.
This is from 3GPP TS 26.244 or ETSI TS 126 244 Table 8.7
Resolves #118