Chromium Code Reviews| 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) |