From 8a5776a0f8bd73e45fadf9de0beff0050e083e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85sa=20Persson?= Date: Tue, 18 Feb 2020 16:33:21 +0100 Subject: [PATCH] Only update the current time of a played out frame if a new frame is played out. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Elapsed time since last played out frame could be incorrect in GetCurrentEstimatedPlayoutNtpTimestampMs (e.g. if playout stops). Bug: webrtc:7065 Change-Id: Ibb40b153ea7291e2cd3843c71ab44ff0fb00971c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168720 Reviewed-by: Ivo Creusen Reviewed-by: Sam Zackrisson Commit-Queue: Åsa Persson Cr-Commit-Position: refs/heads/master@{#30604} --- audio/channel_receive.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc index 21af710892..dfc849394f 100644 --- a/audio/channel_receive.cc +++ b/audio/channel_receive.cc @@ -859,7 +859,7 @@ void ChannelReceive::UpdatePlayoutTimestamp(bool rtcp, int64_t now_ms) { { rtc::CritScope lock(&video_sync_lock_); - if (!rtcp) { + if (!rtcp && playout_timestamp != playout_timestamp_rtp_) { playout_timestamp_rtp_ = playout_timestamp; playout_timestamp_rtp_time_ms_ = now_ms; }