Skip to content

Decide Whether DeleteInvalidFiles Deletes a File Whose Repair Stops on a Post-Decode DTS #1099

Closed

Description

@ptr727

Behavior

#1062 stops the timestamp repair ladder after the remux tier when the DTS failure is post-decode only, RepairAndReVerify(residualPostDecode || DtsInfo.IsPostDecodeOnly(dtsInfo)) in ProcessFile.RepairTimestampsAndSetState(). The file is then marked RepairFailed and VerifyAndRepair() returns false.

With DeleteInvalidFiles on, Process.ProcessFile() passes that file to DeleteFailedFile(). No tool-error, signal, or cancel guard applies, so the file and its sidecar are deleted. On main such a file was re-encoded and kept, although the re-encode only passed verify by dropping the colliding frames.

Raised by Qodo on the 3.23 promotion pull request #1098.

Reproduction shape

  1. Take an MKV whose demux packets carry monotonic DTS but whose decoded video repeats a timestamp, the dts-mixed or dts-duplicate-pts synthetic fixture shape.
  2. Set DeleteInvalidFiles: true.
  3. Run process. The remux tier fails verify, the ladder stops, and the file is deleted.

Choices

  1. Keep the file. A RepairFailed reached only because the ladder stopped on a post-decode failure stays out of DeleteInvalidFiles, through the same kind of guard ToolErrorScope gives a tool that did not run.
  2. Delete it. RepairFailed means the file failed verify after repair, and DeleteInvalidFiles is the user's opt-in to deleting such files.
  3. Keep it only where it plays. Delete only where verify reports decode corruption beyond the timestamp repeat.

The 3.23 promotion should not ship before this is decided, because choice 2 changes what DeleteInvalidFiles deletes compared with 3.22.

Activity

  1. added
    bug
    decision
    on Oct 30, 2026
  2. ptr727 commented on Oct 30, 2026

    @ptr727
    OwnerAuthor

    The maintainer chose choice 1, keep the file. A RepairFailed reached only because the repair ladder stopped after the remux tier on a post-decode DTS failure stays out of DeleteInvalidFiles, guarded the way a tool that did not run is. This is now an ordinary fix that blocks the 3.23 promotion.

  3. removed
    decision
    on Oct 30, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions