You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Matroska save leaves a stale in-cluster Position #118
The Matroska tag save updates CueClusterPosition when an unknown-size cluster moves because the tags grew. The Position element inside that cluster (0xA7) stores the cluster's position in the segment and is copied with the old value. A reader that trusts Position then seeks to the offset from before the edit.
Pull request #106 documents this under "Not rewritten."
Proposed Solution
When a cluster's position in the segment changes, add the same delta to each in-cluster Position (0xA7). If that cluster has a CRC-32, recompute it after the update. A cluster that does not move keeps its original bytes, including a known-size cluster that the tag splice only appends after.
Implement from RFC 9559. This stays open after #53 closes on the tag round-trip.
Alternatives Considered
Stripping Position on save. The element is how a damaged file resynchronizes, so the updated value is the useful one.
Additional Context
CueClusterPosition is already adjusted, including the Cues CRC-32. This issue is the cluster-local Position element only.
Activity