mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #1853] fix(wtv): Set sync_pts alongside min_pts to prevent PTS jump detection #2619
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1853
State: closed
Merged: Yes
Summary
Fixes a regression introduced in PR #1849 (commit
300f8ca6) 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