Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Unified Diff: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc

Issue 2742383002: Fix AudioEncoderOpus::RecreateEncoderInstance() referring to old config_ (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698