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: Refactor Subtitle DeltaTimes Calculation #122

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

Nfrederiksen
Copy link
Collaborator

@Nfrederiksen Nfrederiksen commented Nov 21, 2023

PR resolves #121

It does this by having the obligatory dummy subtitle track be based on loaded subtitles when appropriate and not always on video segments.

In the case where the loaded subtitles only got 'larger' subtitle segments, and need to be spliced through a splicing-endpoint, ie. dummy splice segments are used instead. Then the dummy subtitle segments shall be based on these splice segments rather than the original 'larger' subtitle segments.

(!) Also, a behavior correction has been implemented in this PR.
When expectedSubtitleTracks option is used. The expected tracks which never received any matching segments on load, will instead be given dummy subtitle segments, so that the tracks will always be filled with some kind of segments.
Previously, they were kept empty if nothing was loaded, and so when trying to get segments you'll receive an empty list of segments and the resulting m3u8 file would be blank.

@Nfrederiksen Nfrederiksen added bug Something isn't working enhancement New feature or request labels Nov 21, 2023
@Nfrederiksen Nfrederiksen marked this pull request as ready for review November 21, 2023 09:20
Copy link
Contributor

@birme birme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Nfrederiksen Nfrederiksen merged commit fd9cabf into master Nov 21, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subtitle DeltaTimes Not Always Correct
2 participants