From: Anthony Minessale Date: Mon, 9 Oct 2006 23:00:11 +0000 (+0000) Subject: update X-Git-Tag: v1.0-beta1~1923 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed15d399a0f77dccc3a77b481c5414936a0bf268;p=thirdparty%2Ffreeswitch.git update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3018 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- 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;