Commit 5bd4abe4 authored by Adrien Béraud's avatar Adrien Béraud

audiortp: resync timestamp on CCRTP if necessary

Resync happens when the difference between CCRTP and our clock is higher than 2x the transport rate.

Issue: #46445
Change-Id: Ieacc7fac1e973b86e03fbc53e4b4a2d2a30c3bd5
parent 830d32e0
......@@ -223,9 +223,10 @@ size_t AudioRtpSession::sendMicData()
return 0;
// initialize once
if (firstPacket_) {
int ccrtpTimestamp = queue_.getCurrentTimestamp();
if (firstPacket_ || std::abs(timestamp_ - ccrtpTimestamp) > 2 * timestampIncrement_) {
firstPacket_ = false;
timestamp_ = queue_.getCurrentTimestamp();
timestamp_ = ccrtpTimestamp;
}
// Increment timestamp for outgoing packet
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment