-
Notifications
You must be signed in to change notification settings - Fork 5
VPLAY-10777: Index 0 does not maps to lowest profile #457
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
base: dev_sprint_25_2
Are you sure you want to change the base?
Conversation
c5fc322
to
028d1a4
Compare
streamabstraction.cpp
Outdated
if (bufferValue == 0 || bufferValue > mABRMaxBuffer) | ||
if ((int)bufferValue == 0) | ||
{ | ||
AAMPLOG_WARN("rampDown to lowest profile"); |
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.
"Attempting rampdown to lowest profile as buffer is 0" would be good
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.
Done
support/aampabr/ABRManager.cpp
Outdated
std::lock_guard<std::mutex> lock(mProfileLock); | ||
int profileCount = getProfileCountUnlocked(); | ||
PROFILES_EMPTY_CHECK_RET(profileCount, 0); | ||
auto it = min_element(mProfiles.begin(), mProfiles.end(), |
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.
Fix indentation. Isn't it better to get the first element from the sortedbandwidth data structure?
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.
Indentation is fixed and made changes to read from sortedbandwidth data structure
028d1a4
to
15bedde
Compare
firstBW = innerIter->first; | ||
index = innerIter->second; | ||
} | ||
return index; |
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.
Coverity issue no longer present as of: undefined
Show issue
Coverity Issue - Uninitialized scalar variable
Using uninitialized value "index".
High Impact, CWE-457
UNINIT
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.
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.
Please write optimized code..
firstBW is not used at all, so what's the point of having that variable
auto &profileMap = mSortedBWProfileList.begin()->second;
if (!profileMap.empty()) { index = profileMap.begin()->second;}
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.
ok.Done
15bedde
to
9e3ba53
Compare
Reason for change: Added an api in ABRManager to get the lowest bandwidth index Test Procedure: Updated in ticket Risks: Medium Signed-off-by: Reshma-JO07 <[email protected]>
9e3ba53
to
0085fef
Compare
Reason for change: Added an api in ABRManager
to get the lowest bandwidth index
Test Procedure: Updated in ticket
Risks: Medium