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 subtitle segment loading with current time less than target-duration #4023

Merged
merged 1 commit into from Jun 8, 2021

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Jun 8, 2021

This PR will...

Fix regression introduced in v1.0.6 with #3993 where subtitle track segment loading at a position less than target duration only loads the first segment.

(only appears in streams with irregularly large target durations compared to segment duration)

Why is this Pull Request needed?

The position argument passed to bufferedInfo should never be less than 0 as that is almost certain to not intersect with any buffered time range. subtitle-stream-controller passes in the current time - target duration so that it loads all subtitles at and adjacent to the current time. That resulted in negative values being passes to our buffer util which resulted in misses getting the end of the subtitle stream buffer.

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@robwalch robwalch added this to the 1.0.6 milestone Jun 8, 2021
@robwalch robwalch requested review from itsjamie and removed request for itsjamie June 8, 2021 19:01
@robwalch robwalch changed the title Fix subtitle segment loading with current time less than target-duration Jun 8, 2021
…ent loading at position less than target duration only loads the first segment

(only appears in streams with irregularly large target durations compared to segment duration)
@robwalch robwalch merged commit 2b5edad into master Jun 8, 2021
@robwalch robwalch deleted the bugfix/subtitle-start-pos branch June 8, 2021 20:39
@robwalch robwalch modified the milestones: 1.0.6, 1.0.7 Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant