Bug 1320101 - mNegotiatedMaxBitrate should be able to cap the max bitrate. r=bwc,jesup

MozReview-Commit-ID: 9WRUa0SKuM2

--HG--
extra : rebase_source : c7da24a7a4a061eaadee62b23f98601b75d1fe2c
This commit is contained in:
Andreas Pehrson 2016-12-01 16:52:41 +01:00
parent 836d0a3e98
commit ccf57b4de1

View File

@ -1187,9 +1187,8 @@ WebrtcVideoConduit::SelectBitrates(unsigned short width,
// simulcast layers in this encoding! So sum(layers.maxBitrate) <=
// mNegotiatedMaxBitrate
// Note that out_max already has had mPrefMaxBitrate applied to it
if (mNegotiatedMaxBitrate != 0 && mNegotiatedMaxBitrate > out_max) {
out_max = mNegotiatedMaxBitrate;
}
out_max = MinIgnoreZero(mNegotiatedMaxBitrate, out_max);
MOZ_ASSERT(mPrefMaxBitrate == 0 || out_max <= mPrefMaxBitrate);
}