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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc

Issue 1235143002: Fix simulator issue where chokes didn't apply to non-congested packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addressed. Created 5 years, 5 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
Index: webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
index 5e66697215d4ca1644cb73ea519495fe22017561..cac59ae0adec603f37195482f5491617837a02c6 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
@@ -431,10 +431,10 @@ void ChokeFilter::RunFor(int64_t /*time_ms*/, Packets* in_out) {
assert(in_out);
for (PacketsIt it = in_out->begin(); it != in_out->end(); ) {
int64_t earliest_send_time_us =
- last_send_time_us_ +
- ((*it)->payload_size() * 8 * 1000 + kbps_ / 2) / kbps_;
+ std::max(last_send_time_us_, (*it)->send_time_us());
int64_t new_send_time_us =
- std::max((*it)->send_time_us(), earliest_send_time_us);
+ earliest_send_time_us +
+ ((*it)->payload_size() * 8 * 1000 + kbps_ / 2) / kbps_;
if (delay_cap_helper_->ShouldSendPacket(new_send_time_us,
(*it)->send_time_us())) {
(*it)->set_send_time_us(new_send_time_us);

Powered by Google App Engine
This is Rietveld 408576698