Index: webrtc/video/vie_encoder.cc |
diff --git a/webrtc/video/vie_encoder.cc b/webrtc/video/vie_encoder.cc |
index c30752b6dfb048e96d40a5f2e2e25853fe4b529e..4591d89599a66f71d90adfaca33d6465d0645f89 100644 |
--- a/webrtc/video/vie_encoder.cc |
+++ b/webrtc/video/vie_encoder.cc |
@@ -438,12 +438,13 @@ void ViEEncoder::ReconfigureEncoder() { |
static_cast<uint32_t>(max_data_payload_length_)) == VCM_OK; |
if (!success) { |
LOG(LS_ERROR) << "Failed to configure encoder."; |
+ rate_allocator_.reset(); |
RTC_DCHECK(success); |
+ } else { |
+ video_sender_.UpdateChannelParemeters(rate_allocator_.get(), |
+ bitrate_observer_); |
} |
- video_sender_.UpdateChannelParemeters(rate_allocator_.get(), |
- bitrate_observer_); |
- |
int framerate = stats_proxy_->GetSendFrameRate(); |
if (framerate == 0) |
framerate = codec.maxFramerate; |