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

Unified Diff: webrtc/modules/audio_coding/codecs/g722/g722_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/g722/g722_interface.c
diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_interface.c b/webrtc/modules/audio_coding/codecs/g722/g722_interface.c
index f6b9842eb4c906b34667c5d181013c3cacb3848c..4244d5c80996a6a0762af5d31fed811bb222b3a7 100644
--- a/webrtc/modules/audio_coding/codecs/g722/g722_interface.c
+++ b/webrtc/modules/audio_coding/codecs/g722/g722_interface.c
@@ -66,17 +66,10 @@ int16_t WebRtcG722_CreateDecoder(G722DecInst **G722dec_inst)
}
}
-int16_t WebRtcG722_DecoderInit(G722DecInst *G722dec_inst)
-{
- // Create and/or reset the G.722 decoder
- // Bitrate 64 kbps and wideband mode (2)
- G722dec_inst = (G722DecInst *) WebRtc_g722_decode_init(
- (G722DecoderState*) G722dec_inst, 64000, 2);
- if (G722dec_inst == NULL) {
- return -1;
- } else {
- return 0;
- }
+void WebRtcG722_DecoderInit(G722DecInst* inst) {
+ // Create and/or reset the G.722 decoder
+ // Bitrate 64 kbps and wideband mode (2)
+ WebRtc_g722_decode_init((G722DecoderState*)inst, 64000, 2);
hlundin-webrtc 2015/08/26 13:07:23 You can argue that the code cannot fail here. But,
kwiberg-webrtc 2015/08/26 18:54:37 Well, this CL also changes WebRtc_g722_decode_init
hlundin-webrtc 2015/08/27 12:02:56 I was referring to what happens if the _input_ to
kwiberg-webrtc 2015/08/27 12:11:21 No. It allocates memory unless the caller passes i
}
int WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst)

Powered by Google App Engine
This is Rietveld 408576698