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

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

Issue 2223033002: Fix issue where the number of packets reported in tests/simulations sometimes are negative. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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/estimators/send_side.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.cc
index 777761a03a47f4b84a711bcb97cc81e244c21751..0b9312890fdc2e821c0f9760fe6620613b714172 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.cc
@@ -10,6 +10,8 @@
#include "webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h"
+#include <algorithm>
+
#include "webrtc/base/logging.h"
#include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h"
#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
@@ -78,8 +80,10 @@ void FullBweSender::GiveFeedback(const FeedbackPacket& feedback) {
static_cast<int>(fb.packet_feedback_vector().size());
report_block_.fractionLost = (lost_packets << 8) / expected_packets;
report_block_.cumulativeLost += lost_packets;
+ uint32_t unwrapped = seq_num_unwrapper_.Unwrap(
+ packet_feedback_vector.back().sequence_number);
report_block_.extendedHighSeqNum =
- packet_feedback_vector.back().sequence_number;
+ std::max(unwrapped, report_block_.extendedHighSeqNum);
ReportBlockList report_blocks;
report_blocks.push_back(report_block_);
feedback_observer_->OnReceivedRtcpReceiverReport(

Powered by Google App Engine
This is Rietveld 408576698