From f4ef2dd532692b45b77d22746e8ac407d1f35a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Spr=C3=A5ng?= Date: Tue, 11 Sep 2018 12:37:51 +0200 Subject: [PATCH] Don't signal updated bitrate allocation on encoder paused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the paced queue gets too long becaused of e.g. encoder overshoot, the encoder is paused by setting the target bitrate to 0. Don't signal this 0-bitrate via RTCP TargetBitrate message as the overall target bitrate is probably unchanged. Bug: webrtc:9734 Change-Id: I77f23b707a8d4494d0c89fa05005ac1482eace52 Reviewed-on: https://webrtc-review.googlesource.com/99507 Reviewed-by: Ilya Nikolaevskiy Commit-Queue: Erik Språng Cr-Commit-Position: refs/heads/master@{#24679} --- video/video_send_stream_impl.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/video/video_send_stream_impl.cc b/video/video_send_stream_impl.cc index aa9e6c98ec..3241b0a5c5 100644 --- a/video/video_send_stream_impl.cc +++ b/video/video_send_stream_impl.cc @@ -432,7 +432,10 @@ void VideoSendStreamImpl::SignalEncoderTimedOut() { void VideoSendStreamImpl::OnBitrateAllocationUpdated( const VideoBitrateAllocation& allocation) { - rtp_video_sender_->OnBitrateAllocationUpdated(allocation); + if (encoder_target_rate_bps_ != 0) { + // Send bitrate allocation metadata only if encoder is not paused. + rtp_video_sender_->OnBitrateAllocationUpdated(allocation); + } } void VideoSendStreamImpl::SignalEncoderActive() {