Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1132)

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc

Issue 1734583002: Fix ubsan warnings in BWE tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc
index 6166ff8c2d409ecbbe290025674257c140a76553..066b4b5e35301190ae34e31d701124fb6feecfdc 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<int64_t>(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;
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698