Index: webrtc/video_engine/vie_sync_module.cc |
diff --git a/webrtc/video_engine/vie_sync_module.cc b/webrtc/video_engine/vie_sync_module.cc |
index c5a774462d99bce900a78801c35d76c340f73ca0..9c0aab37d5ba16dcac32731d4203498bbfc2dfa5 100644 |
--- a/webrtc/video_engine/vie_sync_module.cc |
+++ b/webrtc/video_engine/vie_sync_module.cc |
@@ -67,6 +67,13 @@ int ViESyncModule::ConfigureSync(int voe_channel_id, |
RtpRtcp* video_rtcp_module, |
RtpReceiver* video_receiver) { |
CriticalSectionScoped cs(data_cs_.get()); |
+ // Prevent expensive no-ops. |
+ if (voe_channel_id_ == voe_channel_id && |
+ voe_sync_interface_ == voe_sync_interface && |
+ video_receiver_ == video_receiver && |
+ video_rtp_rtcp_ == video_rtcp_module) { |
+ return 0; |
+ } |
voe_channel_id_ = voe_channel_id; |
voe_sync_interface_ = voe_sync_interface; |
video_receiver_ = video_receiver; |