Bug 1140648 - WebRTC check codec config max frame rate is set before using r=jesup

This commit is contained in:
Ethan Hugg 2015-03-06 19:05:11 -08:00
parent 3036078f15
commit 3ac0d1313e

View File

@ -982,11 +982,14 @@ WebrtcVideoConduit::SelectSendFrameRate(unsigned int framerate)
cur_fs = mb_width * mb_height;
max_fps = mCurSendCodecConfig->mMaxMBPS/cur_fs;
if (max_fps < mSendingFramerate)
if (max_fps < mSendingFramerate) {
mSendingFramerate = max_fps;
}
if (mCurSendCodecConfig->mMaxFrameRate < mSendingFramerate)
if (mCurSendCodecConfig->mMaxFrameRate != 0 &&
mCurSendCodecConfig->mMaxFrameRate < mSendingFramerate) {
mSendingFramerate = mCurSendCodecConfig->mMaxFrameRate;
}
}
if (mSendingFramerate != framerate)
{