-
Notifications
You must be signed in to change notification settings - Fork 425
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: bad timeline changes #1526
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1526 +/- ##
==========================================
+ Coverage 86.31% 86.33% +0.02%
==========================================
Files 43 43
Lines 11097 11119 +22
Branches 2532 2540 +8
==========================================
+ Hits 9578 9600 +22
Misses 1519 1519 ☔ View full report in Codecov by Sentry. |
dzianis-dashkevich
approved these changes
Jul 16, 2024
Good finding! |
…ttp-streaming into fix-badTimelineChanges
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Sometimes when we're switching timelines, we run into a situation where the buffer is starved due to the main or audio trying to switch to separate timelines.
shouldWaitForTimelineChange
is called when deciding whether to wait to load or append the current segment. The conditions for this to returnfalse
are:With certain live media, sometimes we'll change playlists (ABR, track change, manual quality switch) during a timeline change. This playlist change, causes a new request for a variant playlist that playlist isn't guaranteed to be the next timeline that the other loader is currently pending. For example:
On a quality change, the main segment loader is moving to an older timeline because the new variant is slightly behind.
This causes the loader to get stuck waiting for the other loader to sync up for a timelineChange which never happens and eventually stalls playback.
Specific Changes proposed
Add checks in the loader to look for bad timeline changes, instances such as this where the loaders are both pending timeline changes to separate timelines and resetting the loader when those cases occur, in order to re-sync timelines and avoid a stall.
Requirements Checklist