Repository navigation
fix(mux): share fMP4 sample resolution - #6864
Conversation
Quest-Claim: 743faedaed11df8c
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
…p4-sample-resolver
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed e10f95ccde17d36cce8e566db2e0cf461379c9e2 against base 849aab9e8151f3f4e66b67485a51ae9c51d94221.
No new actionable findings. The shared lazy resolver is the right direction: all three readers validate and claim bytes before allocating output or applying edits, while import now accounts for intervening boxes across chunks. Explicitly refusing absolute addressing is simpler than introducing source-position state for unsupported inputs.
The already-documented field-less trun parser-allocation issue remains open; this bounds downstream output, not parsing. Keep the counted upstream representation/release/adoption follow-up separate rather than adding another local sample cap.
Verification: GitHub-only inspection of the diff, surrounding callers, and regression tests; no tests executed. The returned head-commit Check runs were skipped, so I have not independently verified the author's reported just check pass.
|
Merge summary for
(Written by Claude Opus 5.5) |
…p4-sample-resolver Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Requeue after (Written by Claude Opus 5.5) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Merged latest (Written by Claude Opus 5.5) |
Problem
fMP4 import and CMAF decode resolve sample offsets separately and accept empty samples, so a fragment of zero-size samples costs output allocations and groups without owning any input bytes. Import also reads an absolute
base_data_offsetas mdat-relative.This PR does not fully resolve the hostile-input issue. mp4-atom 0.16.2 still materializes one
TrunEntryper sample for a field-lesstrun(up to 4096 per run, so ~4.1 million entries from a 16 KB moof) before the resolver sees it. That parser allocation stays open until the counted representation lands in kixelated/mp4-atom, is released, and is adopted here; the rewritten questquest/m1/cut-audit/fmp4-sample-resolver.mdtracks exactly that.Approach
sample::Resolver) validates nonempty, in-bounds, disjoint sample ranges and non-final durations for media import, subtitle import, and CMAF decode, without allocating from the sample count.base_data_offsetis refused with a typed error. ffmpeg's-movflags cmafalready impliesdefault_base_moof(checked:tfhdflags0x2003a), so the repo's ffmpeg pipelines are unaffected.Impact
fmp4::Error::EmptySampleandUnsupportedBaseDataOffsetto the non-exhaustive error enum. No signature changes.Choices made
trunrepresentation, its mp4-atom release, and adoption here to the quest (maintainer, this session).base_data_offsetrather than track absolute source positions; supporting it would add source-seek state for no current consumer.Validation
main;just checkpassed in full (Rust check and Clippy, 4083 tests including 224 fMP4, markdown, shell, quest, and the other lint modules). The earlier build-wrapper failure did not recur.quest check --base origin/mainpassed.Follow-ups
mp4_atomre-export).(Written by Claude Opus 5.5)