mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 1490700 - Cap capability values to avoid truncation. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D5785 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
bbcf773bf1
commit
c66af482b6
@ -901,9 +901,11 @@ MediaEngineRemoteVideoSource::ChooseCapability(
|
||||
// algorithm there.
|
||||
// TODO: This can be removed in bug 1453269.
|
||||
aCapability.width =
|
||||
(c.mWidth.mIdeal.valueOr(0) & 0xffff) << 16 | (c.mWidth.mMax & 0xffff);
|
||||
(std::min(0xffff, c.mWidth.mIdeal.valueOr(0)) & 0xffff) << 16 |
|
||||
(std::min(0xffff, c.mWidth.mMax) & 0xffff);
|
||||
aCapability.height =
|
||||
(c.mHeight.mIdeal.valueOr(0) & 0xffff) << 16 | (c.mHeight.mMax & 0xffff);
|
||||
(std::min(0xffff, c.mHeight.mIdeal.valueOr(0)) & 0xffff) << 16 |
|
||||
(std::min(0xffff, c.mHeight.mMax) & 0xffff);
|
||||
aCapability.maxFPS =
|
||||
c.mFrameRate.Clamp(c.mFrameRate.mIdeal.valueOr(aPrefs.mFPS));
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user