mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-29 18:09:37 +00:00
[PR #1806] fix(parser): use HHMMSSFFF format for ttxt output timestamps #2546
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/1806
State: closed
Merged: Yes
Summary
Fixes a regression in ttxt output where timestamps were missing milliseconds.
The Rust parser was incorrectly setting
date_formattoTimestampFormat::HHMMSS(no milliseconds) instead ofTimestampFormat::HHMMSSFFF(with milliseconds) for--out=ttxt.This bug was introduced in PR #1619 when porting the parser to Rust. The original C code correctly used
ODF_HHMMSSMSwhich includes milliseconds in the timestamp format (HH:MM:SS,mmm).Before (incorrect)
After (correct, matching original C behavior)
Root Cause
In
src/rust/src/parser.rs, theOutFormat::Ttxthandler was setting:Instead of:
Verification
Tested locally with teletext sample:
Output now correctly includes milliseconds in timestamps.
Test plan
🤖 Generated with Claude Code