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

Unified Diff: webrtc/modules/congestion_controller/delay_based_bwe.cc

Issue 2820353002: Fix crash when all acks in a feedback message arrive too late. (Closed)
Patch Set: Add test. Created 3 years, 8 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 | « no previous file | webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/congestion_controller/delay_based_bwe.cc
diff --git a/webrtc/modules/congestion_controller/delay_based_bwe.cc b/webrtc/modules/congestion_controller/delay_based_bwe.cc
index 453b03e34730ba2128f9a64b305c2b62bfe129e5..7b19685d99f56b68d6922030abb0554956896b8d 100644
--- a/webrtc/modules/congestion_controller/delay_based_bwe.cc
+++ b/webrtc/modules/congestion_controller/delay_based_bwe.cc
@@ -172,11 +172,17 @@ DelayBasedBwe::DelayBasedBwe(RtcEventLog* event_log, const Clock* clock)
DelayBasedBwe::Result DelayBasedBwe::IncomingPacketFeedbackVector(
const std::vector<PacketFeedback>& packet_feedback_vector) {
RTC_DCHECK(network_thread_.CalledOnValidThread());
- RTC_DCHECK(!packet_feedback_vector.empty());
std::vector<PacketFeedback> sorted_packet_feedback_vector;
SortPacketFeedbackVector(packet_feedback_vector,
&sorted_packet_feedback_vector);
+ // TOOD(holmer): An empty feedback vector here likely means that
+ // all acks were too late and that the send time history had
+ // timed out. We should reduce the rate when this occurs.
+ if (sorted_packet_feedback_vector.empty()) {
+ LOG(LS_WARNING) << "Very late feedback received.";
+ return DelayBasedBwe::Result();
+ }
if (!uma_recorded_) {
RTC_HISTOGRAM_ENUMERATION(kBweTypeHistogram,
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698