diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc index d67c538a5b..41576516db 100644 --- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc +++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc @@ -446,13 +446,14 @@ void RemoteBitrateEstimatorTest::CapacityDropTestHelper( if (i > 0) { bitrate = (kStartBitrate * i + kBitrateDenom / 2) / kBitrateDenom; } - stream_generator_->AddStream(new testing::RtpStream( - kFramerate, // Frames per second. - bitrate, // Bitrate. - kDefaultSsrc + i, // SSRC. - 90000, // RTP frequency. - 0xFFFFF000 ^ (~0 << (32 - i)), // Timestamp offset. - 0)); // RTCP receive time. + uint32_t mask = ~0ull << (32 - i); + stream_generator_->AddStream( + new testing::RtpStream(kFramerate, // Frames per second. + bitrate, // Bitrate. + kDefaultSsrc + i, // SSRC. + 90000, // RTP frequency. + 0xFFFFF000u ^ mask, // Timestamp offset. + 0)); // RTCP receive time. bitrate_sum += bitrate; } ASSERT_EQ(bitrate_sum, kStartBitrate); diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc index 6166ff8c2d..066b4b5e35 100644 --- a/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc +++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc @@ -178,7 +178,8 @@ void NadaBweSender::GiveFeedback(const FeedbackPacket& feedback) { // Following parameters might be optimized. const int64_t kQueuingDelayUpperBoundMs = 10; - const float kDerivativeUpperBound = 10.0f / min_feedback_delay_ms_; + const float kDerivativeUpperBound = + 10.0f / std::max(1, min_feedback_delay_ms_); // In the modified version, a higher kMinUpperBound allows a higher d_hat // upper bound for calling AcceleratedRampUp. const float kProportionalityDelayBits = 20.0f;