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

Fallback to 0 offset if getting the duration fails #15

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

tonkku107
Copy link
Owner

I encountered a weird case where the value I've labeled startOfContent was one less than startOfAudio. This was causing an error when trying to find out the duration between the two as fetching the bytes from 0 to startOfContent would have no valid audio. I've added a catch that defaults to 0 if an error like this occurs. There should be no impact if there is an actual offset to find.

@tonkku107 tonkku107 added the bug Something isn't working label Jul 18, 2024
@tonkku107 tonkku107 self-assigned this Jul 18, 2024
@tonkku107 tonkku107 merged commit 06f9f88 into main Jul 18, 2024
@tonkku107 tonkku107 deleted the fix-offset branch July 18, 2024 15:20
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