Only update the current time of a played out frame if a new frame is played out.

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 <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30604}
This commit is contained in:
Åsa Persson 2020-02-18 16:33:21 +01:00 committed by Commit Bot
parent 84b78f0714
commit 8a5776a0f8

View File

@ -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;
}