Repository navigation
fix(moq-mux): refuse a moov or Tracks after the importer finished - #4898
Conversation
finish() releases the catalog reservation, so an init segment decoded afterwards declared tracks that could never finish. fMP4 now refuses a moov with fmp4::Error::MoovAfterFinish and MKV a Tracks element with mkv::Error::TracksAfterFinish. Also pins that a deselected track's fragment doesn't release the reservation, checks the Opus rendition in the MKV first-frame test, and asserts the moq-hls e2e test's timeouts instead of discarding them. 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 22 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (8)
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 |
|
Adversarial Codex review (branch diff against Verdict: approve. No material findings: the guards reject late track declarations before any catalog mutation. (Written by Claude Opus 5.5) |
|
Automated review of c33c900 ( This drops the "take a fresh Blocking None found. I checked the invariant both new comments rely on ("only
Non-blocking
CI: Check, Test, Android, macOS and Windows were still queued at review time. Verdict: MERGE (once CI is green) 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: c33c9000bb9d6c293da92a2b96e4107af6c35fe3
No actionable correctness findings. Direction is sound: the guards in rs/moq-mux/src/container/fmp4/import.rs:279-283 and rs/moq-mux/src/container/mkv/import.rs:263-267 reject late first initialization before declaring tracks. I traced reservation release at first selected media, empty selection, and finish; the new regressions cover the intended boundary and tighten the catalog/HLS assertions. This remains a targeted fix, with TS late-PMT behavior explicitly outside its scope.
Verification: static review of the full diff, relevant source context, and current discussion. I did not run tests or independently verify CI; this is not a merge approval.
(Written by OpenAI)
Problem
#4885 holds the catalog reservation until the first frame. Its review follow-up (3b8ad8d) made fMP4 take a fresh
catalog.reserve()when amoovarrived afterfinish(), which declares tracks that can never finish. MKV had the same fallback (catalog.video/audioonce the reservation was gone). Decision (2026-10-06): an init segment afterfinish()is an error.Approach
initrequires the initial reservation; before a moov onlyfinish()can release it, so its absence means finished. Refused withfmp4::Error::MoovAfterFinish. The fresh-reserve()fallback is gone.Trackselement, refused withmkv::Error::TracksAfterFinishbefore any track is added (per-track errors are only logged). The reservation is passed down, so the immediate-publish branch is gone.upgrade.mdsays the catalog waits for media of a selected track; awith_selecttest pins that a deselected fragment arriving first doesn't publish; the MKV first-frame test asserts the Opus rendition; the moq-hls e2e test asserts its two discarded timeout results.Tests
a_moov_after_finish_is_refused(replacesa_moov_after_finish_publishes) andtracks_after_finish_are_refusedboth fail against main's import code.Impact
moq_mux::container::fmp4::Error::MoovAfterFinish: new variant (enum is#[non_exhaustive]).moq_mux::container::mkv::Error::TracksAfterFinish: new variant (enum is#[non_exhaustive]).moov(fMP4) orTracks(MKV) afterfinish()errors instead of declaring tracks. Noted indoc/setup/upgrade.md.Alternatives
finish(self)consuming the importer would make this unrepresentable, but it is a wider API change (callers thatabortor inspect after finishing).decodeafterfinish()would also cover TS, but goes beyond the decision.Follow-ups
finish(), declaring tracks that never finish. Not the reservation fallback, but the same outcome; worth deciding alongside the abort/drop path.🤖 Generated with Claude Code