]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 9 Oct 2006 23:00:11 +0000 (23:00 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 9 Oct 2006 23:00:11 +0000 (23:00 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3018 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/codecs/mod_amr/mod_amr.c

index 15c83055bb68941cd60f73fd511bdcf0f2814b08..44bfea4f8cc5a61dd6ec2c21f316b58561aab71a 100644 (file)
@@ -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;