Make sure send and receive deltas are positive for remote estimated probe clusters.
BUG=b/65531353
Review-Url: https://codereview.webrtc.org/3005393002
Cr-Original-Commit-Position: refs/heads/master@{#19796}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 0c011d9499deb10b3a3d15dd7a3c52b07babeacd
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
index d3dcfca..c43bc12 100644
--- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
+++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
@@ -111,8 +111,11 @@
++current.num_above_min_delta;
}
if (!IsWithinClusterBounds(send_delta_ms, current)) {
- if (current.count >= kMinClusterSize)
+ if (current.count >= kMinClusterSize &&
+ current.send_mean_ms > 0.0f &&
+ current.recv_mean_ms > 0.0f) {
AddCluster(clusters, ¤t);
+ }
current = Cluster();
}
current.send_mean_ms += send_delta_ms;
@@ -123,8 +126,11 @@
prev_send_time = it->send_time_ms;
prev_recv_time = it->recv_time_ms;
}
- if (current.count >= kMinClusterSize)
+ if (current.count >= kMinClusterSize &&
+ current.send_mean_ms > 0.0f &&
+ current.recv_mean_ms > 0.0f) {
AddCluster(clusters, ¤t);
+ }
}
std::list<Cluster>::const_iterator