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

Bugfix: large subtitle target duration can result in subtitles not loading as needed #5597

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Jun 24, 2023

This PR will...

Remove the use of target duration in ensuring subtitle segment N-1 is loaded. Instead, find best match for position, then ensure N-1 is loaded.

Improve handling of MPEGTS VTT syncing. Rather than always require initPTS for the subtitle discontinuity sequence, only require it when parsed subtitles include an MPEGTS map value, log when it's missing, and trigger a non-fatal error only when only AV initPTS from lower sequence numbers have been loaded.

Why is this Pull Request needed?

Since target duration is an upper bound of playlist segment durations, and subtitle segments can be very long, using target duration to ensure the last subtitle segment is loaded can lead to subtitle loading starting several segments back. Loading can then idle before reaching the playhead as the subtitle-stream-controller tries to match the media forward buffer length.

The previous subtitle segment must always be loaded since it may contain subtitles that end after the end of the segment which still need to be rendered.

Are there any points in the code the reviewer needs to double check?

Resolves issues:

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.4.7 milestone Jun 24, 2023
@robwalch robwalch changed the base branch from master to patch/v1.4.x June 24, 2023 04:37
@robwalch robwalch merged commit 7002632 into patch/v1.4.x Jun 28, 2023
14 checks passed
@robwalch robwalch deleted the bugfix/subtitle-target-duration-impacts-segment-selection branch June 28, 2023 01:37
robwalch added a commit that referenced this pull request Jun 28, 2023
…on-impacts-segment-selection

Bugfix: large subtitle target duration can result in subtitles not loading as needed
(cherry picked from commit 7002632)
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.

[Paramount] With nonZero startPosition Player Loads Incorrect VTT Fragments
2 participants