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: allow buffer removes when there's no current media info in loader #1070

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

gesinger
Copy link
Contributor

Previously, if there wasn't any current media info in the loader, then a
remove of buffered contents would not be processed. This would
intuitively make sense, as if there wasn't current media info, then in
theory there shouldn't be any buffered contents. However, it is possible
for there to be buffered contents without current media info in the event
of a non destructive rendition switch. This was noticed when switching
renditions, expecting a fast quality change to clear the contents and
continue playback at a new rendition. Sometimes the remove wouldn't
happen, so the content would continue to play back the old buffered
content from a different rendition. This fix instead allows the removes
so long as there is starting media info (which is available after first
segment download).

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

Previously, if there wasn't any current media info in the loader, then a
remove of buffered contents would not be processed. This would
intuitively make sense, as if there wasn't current media info, then in
theory there shouldn't be any buffered contents. However, it is possible
for there to be buffered contents without current media info in the event
of a non destructive rendition switch. This was noticed when switching
renditions, expecting a fast quality change to clear the contents and
continue playback at a new rendition. Sometimes the remove wouldn't
happen, so the content would continue to play back the old buffered
content from a different rendition. This fix instead allows the removes
so long as there is starting media info (which is available after first
segment download).
Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

This seems too simple.

Copy link
Contributor

@brandonocasey brandonocasey left a comment

Choose a reason for hiding this comment

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

Seems good to me, although it does make me wonder if we should even worry about startingMediaInfo, and just queue the remove no matter what.

@gesinger gesinger merged commit 97ab712 into main Feb 17, 2021
@gesinger gesinger deleted the fix/fast-quality-change-media-info branch February 17, 2021 15:51
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.

3 participants