-
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 repeated segments issue during bandwidth update #1477
Fix repeated segments issue during bandwidth update #1477
Conversation
…l next playlist refresh
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1477 +/- ##
==========================================
+ Coverage 86.06% 87.13% +1.07%
==========================================
Files 42 42
Lines 10748 11887 +1139
Branches 2474 2904 +430
==========================================
+ Hits 9250 10358 +1108
- Misses 1498 1529 +31 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved after nit comments are addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I do think it's probably worth adding a quick test or 2 for the <= extendedFudgeFactor
and !mediaInfo
cases however.
Co-authored-by: Adam Waldron <awaldron@brightcove.com>
…eated-segments-issue-during-bandwidth-update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
…)" This reverts commit 823f072.
Description
We may encounter duplicate segment loading during bandwidth updates.
Since we are re-calculating timestampOffset during each quality switch it results in presenting of duplicate segments.
Consider the following situation:
This log is placed in the
chooseNextRequest_
.As you can see:
Specific Changes proposed
Make an assumption that some segment or segment's part is already buffered if the difference between segment.end and buffered.end is less or equal to 2 * TIME_FUDGE_FACTOR (which is 0.06)
Fallback by selecting the next part or segment using buffered.end + difference padding.
Requirements Checklist