Index: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc |
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc |
index 75655bb0154a6c6ec86f5d4d90b20bed0ece58ad..bac963f4e8e2de9ff047ac78d889e9b187c6469e 100644 |
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc |
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc |
@@ -448,6 +448,7 @@ size_t AudioEncoderOpus::SufficientOutputBufferSize() const { |
bool AudioEncoderOpus::RecreateEncoderInstance(const Config& config) { |
if (!config.IsOk()) |
return false; |
+ config_ = config; |
elad.alon_webrtc.org
2017/03/13 14:50:31
Saving this for last would make more sense if we h
kwiberg-webrtc
2017/03/14 07:04:35
Acknowledged.
|
if (inst_) |
RTC_CHECK_EQ(0, WebRtcOpus_EncoderFree(inst_)); |
input_buffer_.clear(); |
@@ -474,7 +475,6 @@ bool AudioEncoderOpus::RecreateEncoderInstance(const Config& config) { |
RTC_CHECK_EQ(0, |
WebRtcOpus_SetPacketLossRate( |
inst_, static_cast<int32_t>(packet_loss_rate_ * 100 + .5))); |
- config_ = config; |
num_channels_to_encode_ = NumChannels(); |
next_frame_length_ms_ = config_.frame_size_ms; |