[Freeswitch-svn] [commit] r3018 - freeswitch/trunk/src/mod/codecs/mod_amr

Freeswitch SVN anthm at freeswitch.org
Mon Oct 9 19:00:11 EDT 2006


Author: anthm
Date: Mon Oct  9 19:00:11 2006
New Revision: 3018

Modified:
   freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c

Log:
update

Modified: freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c	Mon Oct  9 19:00:11 2006
@@ -200,7 +200,7 @@
 		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 @@
 		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;



More information about the Freeswitch-svn mailing list