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

Bug: Unit confusion (seconds vs microseconds) in microseconds field of Keep Alive request (Client#alive()) #3

Closed
enricovittorini opened this issue Aug 22, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@enricovittorini
Copy link

enricovittorini commented Aug 22, 2023

let microseconds = (elapsed - seconds) * 1000;

hi! can you please explain the above line of code?
let microseconds = (elapsed - seconds) * 1000;
here is seems that you are doing the difference between something in milliseconds (elapsed) and something in seconds (seconds).
Am i missing something?

thanks!


Bug: Unit confusion in microseconds field of Time structure delivered by Client#alive() in keep alive requests as specified in SCTE 104 2019 section 9.2.1
Impact: Affects @/scte104@1.0.0 and earlier

@rezonant rezonant changed the title microseconds explanation Bug: Unit confusion (seconds vs microseconds) in microseconds field of Keep Alive request (Client#alive()) Jan 20, 2024
@rezonant rezonant added the bug Something isn't working label Jan 20, 2024
@rezonant
Copy link
Contributor

Fixed in @/scte104@1.0.1. Affects @/scte104@1.0.0 and all earlier versions.

@rezonant
Copy link
Contributor

rezonant commented Jan 20, 2024

Good catch @enricovittorini ! You can find the fixed logic here:

let microseconds = (elapsed - seconds*1000) * 1000;

I believe this addresses the issue, let me know if you see anything wrong with it.

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

No branches or pull requests

2 participants