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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/remb.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/remb.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.cc
index b1f364b45166fc80f9435c8672ec35a7e7d9f729..c12b269099b5b11b399a09799abd0f56b55505b3 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/remb.cc
@@ -113,11 +113,11 @@ FeedbackPacket* RembReceiver::GetFeedback(int64_t now_ms) {
StatisticianMap statisticians = recv_stats_->GetActiveStatisticians();
RTCPReportBlock report_block;
if (!statisticians.empty()) {
- report_block = BuildReportBlock(statisticians.begin()->second);
+ latest_report_block_ = BuildReportBlock(statisticians.begin()->second);
}
feedback = new RembFeedback(flow_id_, now_ms * 1000, last_feedback_ms_,
- estimated_bps, report_block);
+ estimated_bps, latest_report_block_);
last_feedback_ms_ = now_ms;
double estimated_kbps = static_cast<double>(estimated_bps) / 1000.0;
@@ -137,8 +137,7 @@ RTCPReportBlock RembReceiver::BuildReportBlock(
StreamStatistician* statistician) {
RTCPReportBlock report_block;
RtcpStatistics stats;
- if (!statistician->GetStatistics(&stats, true))
- return report_block;
+ RTC_DCHECK(statistician->GetStatistics(&stats, true));
report_block.fractionLost = stats.fraction_lost;
report_block.cumulativeLost = stats.cumulative_lost;
report_block.extendedHighSeqNum = stats.extended_max_sequence_number;

Powered by Google App Engine
This is Rietveld 408576698