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

Unified Diff: webrtc/system_wrappers/source/timestamp_extrapolator.cc

Issue 2776813002: Bug Fix: WebRTC Receiver Timestamp Jump Detection (Closed)
Patch Set: Timestamp Jump 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/timestamp_extrapolator.cc
diff --git a/webrtc/system_wrappers/source/timestamp_extrapolator.cc b/webrtc/system_wrappers/source/timestamp_extrapolator.cc
index c7ed856a54742222434e898780d46393981dbbb1..b9243ca80c2a75d0b5df5f17134e2cb6c33a7379 100644
--- a/webrtc/system_wrappers/source/timestamp_extrapolator.cc
+++ b/webrtc/system_wrappers/source/timestamp_extrapolator.cc
@@ -85,14 +85,6 @@ TimestampExtrapolator::Update(int64_t tMs, uint32_t ts90khz)
int64_t unwrapped_ts90khz = static_cast<int64_t>(ts90khz) +
_wrapArounds * ((static_cast<int64_t>(1) << 32) - 1);
- if (_prevUnwrappedTimestamp >= 0 &&
- unwrapped_ts90khz < _prevUnwrappedTimestamp)
- {
- // Drop reordered frames.
- _rwLock->ReleaseLockExclusive();
- return;
- }
-
if (_firstAfterReset)
{
// Make an initial guess of the offset,
@@ -114,6 +106,15 @@ TimestampExtrapolator::Update(int64_t tMs, uint32_t ts90khz)
// the offset uncertainty. Don't do this during startup.
_pP[1][1] = _pP11;
}
+
+ if (_prevUnwrappedTimestamp >= 0 &&
+ unwrapped_ts90khz < _prevUnwrappedTimestamp)
+ {
+ // Drop reordered frames.
+ _rwLock->ReleaseLockExclusive();
+ return;
+ }
+
//T = [t(k) 1]';
//that = T'*w;
//K = P*T/(lambda + T'*P*T);
« 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