From 96d1d89c3e090a56876a6654b2fef542bb55843b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85sa=20Persson?= Date: Wed, 22 Apr 2015 14:57:50 +0200 Subject: [PATCH] Do not register bandwidth observer for receive only channels. An incoming rtcp report block is inserted to both send and receive channels in Call::DeliverRtcp. The report block may also be accepted by each receive channel (in addition to the send channel) but fails to calculate the rtt (=0). Remove registration of bandwidth observer for receive channels. Prevents multiple callbacks to the bitrate controller (and with incorrect rtt) for an incoming report block. BUG=4546 R=mflodman@webrtc.org, pbos@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/45209004 Cr-Commit-Position: refs/heads/master@{#9055} --- webrtc/video_engine/vie_channel.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webrtc/video_engine/vie_channel.cc b/webrtc/video_engine/vie_channel.cc index 3b467fbd5c..557f14d9a5 100644 --- a/webrtc/video_engine/vie_channel.cc +++ b/webrtc/video_engine/vie_channel.cc @@ -1853,7 +1853,6 @@ RtpRtcp::Configuration ViEChannel::CreateRtpRtcpConfiguration() { configuration.audio = false; configuration.outgoing_transport = &vie_sender_; configuration.intra_frame_callback = intra_frame_observer_; - configuration.bandwidth_callback = bandwidth_observer_.get(); configuration.rtt_stats = rtt_stats_; configuration.rtcp_packet_type_counter_observer = &rtcp_packet_type_counter_observer_; @@ -1861,6 +1860,8 @@ RtpRtcp::Configuration ViEChannel::CreateRtpRtcpConfiguration() { configuration.send_bitrate_observer = &send_bitrate_observer_; configuration.send_frame_count_observer = &send_frame_count_observer_; configuration.send_side_delay_observer = &send_side_delay_observer_; + if (sender_) + configuration.bandwidth_callback = bandwidth_observer_.get(); return configuration; }