From: doancea Date: Mon, 1 Jun 2015 16:22:45 +0000 (+0200) Subject: FS-7597: [mod_codec2] Fixed encoded_data_len for MODE 2400, it should be 6 bytes... X-Git-Tag: v1.4.20~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec801c25f83711112880f9281c10ec539e4921c5;p=thirdparty%2Ffreeswitch.git FS-7597: [mod_codec2] Fixed encoded_data_len for MODE 2400, it should be 6 bytes. Also replaced 2550 bps bitrate (obsoleted operation mode) by 2400 --- diff --git a/src/mod/codecs/mod_codec2/mod_codec2.c b/src/mod/codecs/mod_codec2/mod_codec2.c index bb70bf8c46..cee954499a 100644 --- a/src/mod/codecs/mod_codec2/mod_codec2.c +++ b/src/mod/codecs/mod_codec2/mod_codec2.c @@ -152,7 +152,7 @@ static switch_status_t switch_codec2_encode(switch_codec_t *codec, switch_codec_ fflush(context->encoder_out); #endif - *encoded_data_len = 8; + *encoded_data_len = 6; return SWITCH_STATUS_SUCCESS; } @@ -230,7 +230,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_codec2_load) *module_interface = switch_loadable_module_create_module_interface(pool, modname); - SWITCH_ADD_CODEC(codec_interface, "CODEC2 2550bps"); + SWITCH_ADD_CODEC(codec_interface, "CODEC2 2400bps"); switch_core_codec_add_implementation(pool, codec_interface, SWITCH_CODEC_TYPE_AUDIO, @@ -239,7 +239,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_codec2_load) NULL, 8000, /* samples/sec */ 8000, /* samples/sec */ - 2550, /* bps */ + 2400, /* bps */ 20000, /* ptime */ CODEC2_SAMPLES_PER_FRAME, /* samples decoded */ CODEC2_SAMPLES_PER_FRAME*2, /* bytes decoded */