Bug 1243607: Fix out-of-order limit checks in WebRTC bandwidth settings rs=me

--HG--
extra : commitid : 22DKuIZamKy
This commit is contained in:
Randell Jesup 2016-01-28 00:37:41 -05:00
Родитель 7d2fdd3865
Коммит 04d1e65b1b
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -1034,16 +1034,15 @@ WebrtcVideoConduit::SelectBandwidth(webrtc::VideoCodec& vie_codec,
if (mMinBitrate && mMinBitrate > vie_codec.minBitrate) {
vie_codec.minBitrate = mMinBitrate;
}
// If we try to set a minimum bitrate that is too low, ViE will reject it.
vie_codec.minBitrate = std::max((unsigned int) webrtc::kViEMinCodecBitrate,
vie_codec.minBitrate);
if (mStartBitrate && mStartBitrate > vie_codec.startBitrate) {
vie_codec.startBitrate = mStartBitrate;
}
if (mMaxBitrate && mMaxBitrate > vie_codec.maxBitrate) {
vie_codec.maxBitrate = mMaxBitrate;
}
// If we try to set a minimum bitrate that is too low, ViE will reject it.
vie_codec.minBitrate = std::max((unsigned int) webrtc::kViEMinCodecBitrate,
vie_codec.minBitrate);
}
static void ConstrainPreservingAspectRatioExact(uint32_t max_fs,