Skip to content

Report Every Repair a Track Needs When Its State Holds One #1127

Closed

Description

@ptr727

Behavior

TrackProps holds one State per track. SetLanguage() can set ReMux for a language tag that does not match its IETF tag, and SetFlagsFromTitle() then overwrites State with SetFlags when the title names a flag that is not set.

So ProcessFile.HasMetadataErrors(TrackProps.StateType.ReMux) misses such a track. With ReMux and SetTrackFlags both off, the unrepaired-metadata report in RepairMetadataErrors() names only the track flags, and says nothing about the remux the language tag needs.

Reproduction shape

  1. Give a MkvMerge audio track the language eng, the IETF tag de, and the title Commentary with the commentary flag unset.
  2. Turn ReMux and SetTrackFlags off, then process the file.
  3. The log reports "Track flags not set" only.

Expected

A track that needs more than one repair reports each one, for example by keeping the remux need apart from the flag state.

Found by the local review of the pull request for #1074, #1077 and #1116.

Activity

  1. added
    pre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings
    on Oct 31, 2026
  2. ptr727 commented on Oct 31, 2026

    @ptr727
    OwnerAuthor

    Maintainer decision on the design:

    • TrackProps.State keeps only the track disposition, one value per track: None, Keep, Remove, Unsupported.
    • A separate [Flags] property, TrackProps.Actions, holds every action the track needs: SetLanguage, SetFlags, ReMux, ReEncode, DeInterlace. Actions are added and removed as needed, so one finding never erases another.
    • The actions are grouped by what they change. AttributeActions (SetLanguage, SetFlags) change track metadata. StreamActions (ReMux, ReEncode, DeInterlace) rewrite the file.
    • The sidecar does not change. Track state and actions live only in memory and are parsed again from the stored tool output on every refresh.

    The reporting fix follows from this: a track that needs a remux and flags keeps both actions, so it is repaired and reported for each.

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

    pre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions