-
Notifications
You must be signed in to change notification settings - Fork 426
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 average bandwidth value from decaying when the system bandwidth being constant #1137
Fix average bandwidth value from decaying when the system bandwidth being constant #1137
Conversation
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Codecov Report
@@ Coverage Diff @@
## main #1137 +/- ##
==========================================
+ Coverage 86.20% 86.47% +0.26%
==========================================
Files 39 39
Lines 9289 9501 +212
Branches 2127 2191 +64
==========================================
+ Hits 8008 8216 +208
- Misses 1281 1285 +4
Continue to review full report at Codecov.
|
Wrote a test for this #1141 |
Congrats on merging your first pull request! 🎉🎉🎉 |
Description
In the
movingAverageBandwidthSelector
method, we are using this line to calculate the average.I see a problem here.
To explain with an example,
I have an average value of
1000
currently and a new chunk got downloaded with a bandwidth of500
. And the next chunk is downloaded after1 second
.The
systemBandwidth
is updated after each chunk gets downloaded.So, my expectation is this
500
should be contributed to the average only once until the next chunk gets downloaded.But, as the
checkABR
method is getting called for every250ms
, this500
is getting contributed4 times
until the next chunk gets downloaded, by which the average value is getting decreased gradually because thesystemBandwidth
is being constant until then.You can check the logs attached below.
Video-js-ABR.log
Specific Changes proposed
systemBandwidth
changes and is greater than zero.Requirements Checklist