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

Fix time conversion #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmitrylyzo
Copy link
Collaborator

Changes
Round milliseconds to avoid floating point representation errors.

Issues
When attempting to remove an extra offset.

Dialogue: 0,00:00:08.08,00:00:08.12,Default,,0000,0000,0000,,00:00:08.08
Dialogue: 0,00:00:08.12,00:00:08.16,Default,,0000,0000,0000,,00:00:08.12

8.12 s in the request turns into 8.11999999999... s, which gives 8119 ms. As a result, JSO returns the wrong event - 00:00:08.08,00:00:08.12. Therefore, the oneshot renderer produces the 08.08,08.12 frame as 08.12,08.16.

Round milliseconds to avoid floating point representation errors.
@dmitrylyzo dmitrylyzo added the bug Something isn't working label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant