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

Unified Diff: webrtc/modules/remote_bitrate_estimator/inter_arrival.cc

Issue 1254723006: Ignore packets with reordered timestamps when doing BWE. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/remote_bitrate_estimator/inter_arrival.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/inter_arrival.cc b/webrtc/modules/remote_bitrate_estimator/inter_arrival.cc
index a9a7ae7d07fb286d653b78346863b58c803b655b..3dee305bad109170c11650b81afd2bb7368581bb 100644
--- a/webrtc/modules/remote_bitrate_estimator/inter_arrival.cc
+++ b/webrtc/modules/remote_bitrate_estimator/inter_arrival.cc
@@ -13,6 +13,7 @@
#include <algorithm>
#include <cassert>
+#include "webrtc/base/logging.h"
#include "webrtc/modules/interface/module_common_types.h"
namespace webrtc {
@@ -52,6 +53,14 @@ bool InterArrival::ComputeDeltas(uint32_t timestamp,
prev_timestamp_group_.timestamp;
*arrival_time_delta_ms = current_timestamp_group_.complete_time_ms -
prev_timestamp_group_.complete_time_ms;
+ if (*arrival_time_delta_ms < 0) {
+ // The group of packets has been reordered since receiving its local
+ // arrival timestamp.
+ LOG(LS_WARNING) << "Packets are being reordered on the path from the "
+ "socket to the bandwidth estimator. Ignoring this "
+ "packet for bandwidth estimation.";
+ return false;
+ }
assert(*arrival_time_delta_ms >= 0);
pbos-webrtc 2015/07/24 09:04:37 Do you need this assert now? :D
*packet_size_delta = static_cast<int>(current_timestamp_group_.size) -
static_cast<int>(prev_timestamp_group_.size);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698