Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: webrtc/video/rtp_streams_synchronizer.cc

Issue 2334113004: Do not update stream synchronization if no new video packet has been received since last u… (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/rtp_streams_synchronizer.cc
diff --git a/webrtc/video/rtp_streams_synchronizer.cc b/webrtc/video/rtp_streams_synchronizer.cc
index 75dd8cd1b3ad4571cc36b2608c754bdb7104f941..885dad39797fcebeb585e4d3fe4c564d8b3a33e6 100644
--- a/webrtc/video/rtp_streams_synchronizer.cc
+++ b/webrtc/video/rtp_streams_synchronizer.cc
@@ -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_,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698