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

Unified Diff: webrtc/modules/audio_coding/codecs/g722/g722_decode.c

Issue 1319683002: AudioDecoder: Replace Init() with Reset() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@buffer
Patch Set: review fixes 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_decode.c
diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_decode.c b/webrtc/modules/audio_coding/codecs/g722/g722_decode.c
index 8fdeec162b3424900c1637d2db93c584c10592e4..952a7d037f61a5e0a2cdc1d01bf4229ff1c0ff3e 100644
--- a/webrtc/modules/audio_coding/codecs/g722/g722_decode.c
+++ b/webrtc/modules/audio_coding/codecs/g722/g722_decode.c
@@ -157,11 +157,7 @@ static void block4(G722DecoderState *s, int band, int d)
G722DecoderState* WebRtc_g722_decode_init(G722DecoderState* s,
int rate,
int options) {
- if (s == NULL)
- {
- if ((s = (G722DecoderState *) malloc(sizeof(*s))) == NULL)
- return NULL;
- }
+ s = s ? s : malloc(sizeof(*s));
memset(s, 0, sizeof(*s));
if (rate == 48000)
s->bits_per_sample = 6;
« no previous file with comments | « webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c ('k') | webrtc/modules/audio_coding/codecs/g722/g722_interface.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698