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

Unified Diff: webrtc/modules/audio_coding/codecs/opus/opus_interface.c

Issue 1319683002: AudioDecoder: Replace Init() with Reset() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@buffer
Patch Set: Created 5 years, 4 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
Index: webrtc/modules/audio_coding/codecs/opus/opus_interface.c
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_interface.c b/webrtc/modules/audio_coding/codecs/opus/opus_interface.c
index e2a8383c4b665da3982843be94a360946d4f8d49..2849b6413883082f6b7ebba9321bca0b8a1b4132 100644
--- a/webrtc/modules/audio_coding/codecs/opus/opus_interface.c
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_interface.c
@@ -11,6 +11,7 @@
#include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
#include "webrtc/modules/audio_coding/codecs/opus/opus_inst.h"
+#include <assert.h>
hlundin-webrtc 2015/08/26 13:07:23 Why? You're not adding any asserts and I couldn't
kwiberg-webrtc 2015/08/26 18:54:37 No. There was probably some intermediate state whe
#include <stdlib.h>
#include <string.h>
@@ -250,13 +251,9 @@ int WebRtcOpus_DecoderChannels(OpusDecInst* inst) {
return inst->channels;
}
-int16_t WebRtcOpus_DecoderInit(OpusDecInst* inst) {
- int error = opus_decoder_ctl(inst->decoder, OPUS_RESET_STATE);
- if (error == OPUS_OK) {
- inst->in_dtx_mode = 0;
- return 0;
- }
- return -1;
+void WebRtcOpus_DecoderInit(OpusDecInst* inst) {
+ opus_decoder_ctl(inst->decoder, OPUS_RESET_STATE);
+ inst->in_dtx_mode = 0;
}
/* For decoder to determine if it is to output speech or comfort noise. */

Powered by Google App Engine
This is Rietveld 408576698