From ed15d399a0f77dccc3a77b481c5414936a0bf268 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 9 Oct 2006 23:00:11 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3018 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/codecs/mod_amr/mod_amr.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/mod/codecs/mod_amr/mod_amr.c b/src/mod/codecs/mod_amr/mod_amr.c index 15c83055bb..44bfea4f8c 100644 --- a/src/mod/codecs/mod_amr/mod_amr.c +++ b/src/mod/codecs/mod_amr/mod_amr.c @@ -200,7 +200,7 @@ static switch_status_t switch_amr_init(switch_codec_t *codec, switch_codec_flag_ context->decoder_state = NULL; if (encoding) { - context->encoder_state = Encoder_Interface_init(1); + context->encoder_state = Encoder_Interface_init(0); } if (decoding) { @@ -268,13 +268,7 @@ static switch_status_t switch_amr_decode(switch_codec_t *codec, return SWITCH_STATUS_FALSE; } - if (encoded_data_len == 1) { - memset(decoded_data, 255, codec->implementation->bytes_per_frame); - *flag |= SFF_CNG; - } else { - Decoder_Interface_Decode( context->decoder_state, (unsigned char *)encoded_data, (int16_t *)decoded_data, 0 ); - } - + Decoder_Interface_Decode(context->decoder_state, (unsigned char *)encoded_data, (int16_t *)decoded_data, 0); *decoded_data_len = codec->implementation->bytes_per_frame; return SWITCH_STATUS_SUCCESS;