diff --git a/webrtc/system_wrappers/source/timestamp_extrapolator.cc b/webrtc/system_wrappers/source/timestamp_extrapolator.cc index c7ed856a54..b9243ca80c 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(ts90khz) + _wrapArounds * ((static_cast(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);