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: Low-Latency false starts when part selection does not match fragment #6841

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

robwalch
Copy link
Collaborator

This PR will...

Fix unused part loading when selected frag passed to _doFragLoad is not used by part selection.

Why is this Pull Request needed?

There was an expectation that _doFragLoad(frag) will resolve with the frag or a part from that frag being loaded. The result of _doFragLoad is ignored if streamController.currentFrag no longer matches frag.

This PR fixes the case where _doFragLoad(frag) resolves with a different fragment because of part selection needing to use fragmentHint or an independent part in the part list belonging to another fragment:

    if (this.loadingParts && frag.sn !== 'initSegment') {
      const partList = details.partList;
      if (partList && progressCallback) {
        if (targetBufferTime > frag.end && details.fragmentHint) {
          frag = details.fragmentHint;
        }
        const partIndex = this.getNextPart(partList, frag, targetBufferTime);
        if (partIndex > -1) {

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.6.0 milestone Nov 13, 2024
@robwalch robwalch merged commit 9c5089d into master Nov 14, 2024
15 of 16 checks passed
@robwalch robwalch deleted the bugfix/frag-select-change-in-part-selection branch November 14, 2024 19:07
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.

1 participant