Fix for clock reset repair.
Bug: none Change-Id: I9a7ebbc75f1cc222e2b1b9c8ef546e54710275e8 Reviewed-on: https://webrtc-review.googlesource.com/c/108600 Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25434}
This commit is contained in:
committed by
Commit Bot
parent
a2e133d0f5
commit
992a868393
@ -1216,10 +1216,10 @@ PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type,
|
||||
|
||||
if (packet_time_us != -1) {
|
||||
if (receive_time_calculator_) {
|
||||
int64_t system_time_us =
|
||||
rtc::SystemTimeNanos() / rtc::kNumNanosecsPerMicrosec;
|
||||
// Repair packet_time_us for clock resets by comparing a new read of
|
||||
// the same clock (TimeUTCMicros) to a monotonic clock reading.
|
||||
packet_time_us = receive_time_calculator_->ReconcileReceiveTimes(
|
||||
packet_time_us, system_time_us, clock_->TimeInMicroseconds());
|
||||
packet_time_us, rtc::TimeUTCMicros(), clock_->TimeInMicroseconds());
|
||||
}
|
||||
parsed_packet.set_arrival_time_ms((packet_time_us + 500) / 1000);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user