Fix crash in vie_encoder when encoder configure fails

Bad changes are from CL 2745523002.

These changes were originally done by Sprang@. Sometimes, when encoder is failed to be configured on release build it causes a crash at vie_encoder.cc:451. That changes look like they are not important to other changes. This CL is simply reverting them.

BUG=chromium:701526

Review-Url: https://codereview.webrtc.org/2747403002
Cr-Commit-Position: refs/heads/master@{#17241}
This commit is contained in:
ilnik 2017-03-15 04:24:21 -07:00 committed by Commit bot
parent 7f704df74c
commit 35b7de480b

View File

@ -438,13 +438,12 @@ 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;