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

Unified Diff: webrtc/modules/audio_coding/neteq/rtcp.cc

Issue 2460393002: NetEq jitter calculation now done in int64_t. (Closed)
Patch Set: Created 4 years, 1 month 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 | « webrtc/modules/audio_coding/neteq/rtcp.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/neteq/rtcp.cc
diff --git a/webrtc/modules/audio_coding/neteq/rtcp.cc b/webrtc/modules/audio_coding/neteq/rtcp.cc
index 7ef40bc814548de74cc86df77a3f4633a76c8f54..c5a7050e8f067143943ef6783252cdb3a566b872 100644
--- a/webrtc/modules/audio_coding/neteq/rtcp.cc
+++ b/webrtc/modules/audio_coding/neteq/rtcp.cc
@@ -47,7 +47,7 @@ void Rtcp::Update(const RTPHeader& rtp_header, uint32_t receive_timestamp) {
if (received_packets_ > 1) {
int32_t ts_diff = receive_timestamp - (rtp_header.timestamp - transit_);
ts_diff = WEBRTC_SPL_ABS_W32(ts_diff);
- int32_t jitter_diff = (ts_diff << 4) - jitter_;
+ uint64_t jitter_diff = (uint64_t{ts_diff} << 4) - jitter_;
ossu 2016/10/31 14:11:01 Uh... I spoke too soon. Clearly this could be nega
// Calculate 15 * jitter_ / 16 + jitter_diff / 16 (with proper rounding).
jitter_ = jitter_ + ((jitter_diff + 8) >> 4);
}
« no previous file with comments | « webrtc/modules/audio_coding/neteq/rtcp.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698