fix(wtv): Set sync_pts alongside min_pts to prevent PTS jump detection #1853
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a regression introduced in PR #1849 (commit 300f8ca) where WTV files with large initial PTS values would produce empty output.
Root cause: The WTV timing fix set
min_ptsandpts_set=2(MinPtsSet) but didn't setsync_pts. The Rust timing code checks for PTS jumps by computingcurrent_pts - sync_pts, and withsync_pts=0butcurrent_ptsat a large value (e.g., 6039323550 for a file starting at 18:38:23), the difference triggered false PTS jump detection.Fix: Set
sync_ptsto the same value asmin_ptswhen first initializing timing.Test results
Before (master):
Output: Empty file, progress showed
-1118:-23(negative hours!)After (this fix):
00:00:00,601 --> 00:00:02,801✅ Matches expected00:00:02,837 --> 00:00:06,305✅ Matches expected00:00:11,145 --> 00:00:12,411✅ Matches expectedTested on all WTV samples in the test corpus - all produce correct output.
Test plan
🤖 Generated with Claude Code