Do not update stream synchronization if no new video packet has been received since last update (e.g. video muted).
BUG= Review-Url: https://codereview.webrtc.org/2334113004 Cr-Commit-Position: refs/heads/master@{#14271}
This commit is contained in:
@ -123,6 +123,7 @@ void RtpStreamsSynchronizer::Process() {
|
||||
const int current_audio_delay_ms = audio_jitter_buffer_delay_ms +
|
||||
playout_buffer_delay_ms;
|
||||
|
||||
int64_t last_video_receive_ms = video_measurement_.latest_receive_time_ms;
|
||||
if (UpdateMeasurements(&video_measurement_, video_rtp_rtcp_,
|
||||
video_rtp_receiver_) != 0) {
|
||||
return;
|
||||
@ -133,6 +134,11 @@ void RtpStreamsSynchronizer::Process() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (last_video_receive_ms == video_measurement_.latest_receive_time_ms) {
|
||||
// No new video packet has been received since last update.
|
||||
return;
|
||||
}
|
||||
|
||||
int relative_delay_ms;
|
||||
// Calculate how much later or earlier the audio stream is compared to video.
|
||||
if (!sync_->ComputeRelativeDelay(audio_measurement_, video_measurement_,
|
||||
|
||||
Reference in New Issue
Block a user