Bug 1393687 - Fix handling of max-fr parameter; r=jesup
authorDan Minor <dminor@mozilla.com>
Thu, 07 Sep 2017 16:05:52 -0400
changeset 430443 3022e88f7a8fe80945ad5a82a94e735b0af2ce2d
parent 430442 6c7111ab968fc55accf3a2c6faf498cfd7c997a4
child 430444 a36c26e1b55ec712213506c015802625834758af
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1393687
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1393687 - Fix handling of max-fr parameter; r=jesup MozReview-Commit-ID: C30K1Pogm5u
media/webrtc/trunk/webrtc/modules/video_coding/video_sender.cc
--- a/media/webrtc/trunk/webrtc/modules/video_coding/video_sender.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_coding/video_sender.cc
@@ -189,17 +189,18 @@ int VideoSender::FrameRate(unsigned int*
 }
 
 EncoderParameters VideoSender::UpdateEncoderParameters(
     const EncoderParameters& params,
     VideoBitrateAllocator* bitrate_allocator,
     uint32_t target_bitrate_bps) {
   uint32_t video_target_rate_bps = _mediaOpt.SetTargetRates(target_bitrate_bps);
   uint32_t input_frame_rate = _mediaOpt.InputFrameRate();
-  if (input_frame_rate == 0)
+
+  if (input_frame_rate == 0 || input_frame_rate > current_codec_.maxFramerate)
     input_frame_rate = current_codec_.maxFramerate;
 
   BitrateAllocation bitrate_allocation;
   if (bitrate_allocator) {
     bitrate_allocation = bitrate_allocator->GetAllocation(video_target_rate_bps,
                                                           input_frame_rate);
   } else {
     DefaultVideoBitrateAllocator default_allocator(current_codec_);