AudioDecoder: Replace Init() with Reset()
The Init() method was previously used to initialize and reset
decoders, and returned an error code. The new Reset() method is used
for reset only; the constructor is now responsible for fully
initializing the AudioDecoder.
Reset() doesn't return an error code; it turned out that none of the
functions it ended up calling could actually fail, so this CL removes
their error return codes as well.
R=henrik.lundin@webrtc.org
Review URL: https://codereview.webrtc.org/1319683002 .
Cr-Commit-Position: refs/heads/master@{#9798}
diff --git a/webrtc/modules/audio_coding/codecs/isac/unittest.cc b/webrtc/modules/audio_coding/codecs/isac/unittest.cc
index d05ffa6..673d290 100644
--- a/webrtc/modules/audio_coding/codecs/isac/unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/isac/unittest.cc
@@ -111,7 +111,7 @@
typename T::instance_type* encdec;
ASSERT_EQ(0, T::Create(&encdec));
ASSERT_EQ(0, T::EncoderInit(encdec, adaptive ? 0 : 1));
- ASSERT_EQ(0, T::DecoderInit(encdec));
+ T::DecoderInit(encdec);
ASSERT_EQ(0, T::SetEncSampRate(encdec, sample_rate_hz));
if (adaptive)
ASSERT_EQ(0, T::ControlBwe(encdec, bit_rate, frame_size_ms, false));
@@ -129,7 +129,7 @@
ASSERT_EQ(0, T::Control(enc, bit_rate, frame_size_ms));
typename T::instance_type* dec;
ASSERT_EQ(0, T::Create(&dec));
- ASSERT_EQ(0, T::DecoderInit(dec));
+ T::DecoderInit(dec);
T::SetInitialBweBottleneck(dec, bit_rate);
T::SetEncSampRateInDecoder(dec, sample_rate_hz);