Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TTML generator millisecond formatting uses two digits #1180

Closed
marcusspangenberg opened this issue Mar 6, 2023 · 1 comment · Fixed by #1179 or #1312
Closed

TTML generator millisecond formatting uses two digits #1180

marcusspangenberg opened this issue Mar 6, 2023 · 1 comment · Fixed by #1179 or #1312
Labels
priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly

Comments

@marcusspangenberg
Copy link
Contributor

System info

Shaka Packager Version: d5ca6e8

Issue and steps to reproduce the problem

TTML generator function ToTtmlTime formats milliseconds as %02d causing millisecond values less than 100 to be formatted incorrectly. For example 10 ms will be formatted as .10 instead of .010 causing text cues to be displayed out of order.

I have a fix for this in PR #1179

@joeyparrish
Copy link
Member

There doesn't seem to be any requirement in the TTML spec that 3 digits be used, but if our internal representation is milliseconds, %02d is definitely a bug because it rounds off the values.

Thanks for fixing this!

@joeyparrish joeyparrish added type: bug Something isn't working correctly priority: P2 Smaller impact or easy workaround labels Jul 5, 2023
joeyparrish pushed a commit that referenced this issue Jul 5, 2023
Fix bug where milliseconds were formatted with two digits instead of
three, resulting in incorrect timestamps in TTML cues.

Fixes #1180
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Sep 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
2 participants