Skip to content

chore(transmux): deduplicate box-nav helpers between cenc_decrypt and media #982

Description

@fishloa

Summary

cenc_decrypt.rs (lines 873–910) defines private copies of find_box, find_top_box, iter_child_boxes, iter_top_boxes, and descend — functionally identical to the pub(crate) find_top_box in media.rs:541 and the other box-nav helpers there.

Location

  • transmux/src/cenc_decrypt.rs:873-910 — private copies
  • transmux/src/media.rs:541+ — the canonical pub(crate) versions

Impact

Low. Code duplication, not a correctness bug. But any fix to the box iteration logic would need to be applied in both places.

Suggested fix

Remove the private copies in cenc_decrypt.rs and use the pub(crate) versions from media.rs (or a shared internal module).


Discovered by static analysis audit (transmux deep scan).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions