Skip to content

Fix dref url self_contained flag bit position#147

Open
iameli wants to merge 1 commit intokixelated:mainfrom
streamplace:fix/dref-url-self-contained-flag
Open

Fix dref url self_contained flag bit position#147
iameli wants to merge 1 commit intokixelated:mainfrom
streamplace:fix/dref-url-self-contained-flag

Conversation

@iameli
Copy link

@iameli iameli commented Mar 16, 2026

Noticed that this library was setting 0x000002 on the url box and couldn't figure out why; Claude figured out it was a bug. Neat.

From Claude:

The self_contained flag in the url box should be bit 0 (0x000001) per ISOBMFF §8.7.2, but was defined at bit index 1, producing flags=0x000002. This could cause strict parsers to interpret the data reference as non-self-contained.

The self_contained flag in the url box should be bit 0 (0x000001)
per ISOBMFF §8.7.2, but was defined at bit index 1, producing
flags=0x000002. This could cause strict parsers to interpret the
data reference as non-self-contained.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 228ede60-880a-42e4-8333-8a508e45abb6

📥 Commits

Reviewing files that changed from the base of the PR and between 3073b3e and 212b44c.

📒 Files selected for processing (1)
  • src/moov/trak/mdia/minf/dinf/dref/url.rs

Walkthrough

The change modifies the default behavior of the Url extension in the ISOBMFF format handling. Specifically, the self_contained flag default is changed from 1 to 0 in the public Url extension declaration. Additionally, during encoding, the UrlExt initialization is updated to include ISOBMFF conformance documentation and explicitly sets self_contained to true, replacing a previous placeholder comment. These modifications affect how the URL extension interprets media data containment within the file format.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing the bit position of the self_contained flag in the dref url box from bit 1 to bit 0, which is the core purpose of this PR.
Description check ✅ Passed The description clearly explains the bug being fixed: the self_contained flag was at the wrong bit position (bit 1 instead of bit 0 per ISOBMFF), which is directly related to the changeset modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

@bradh
Copy link
Collaborator

bradh commented Mar 17, 2026

Fix looks good. Needs a test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants