diff --git a/src/mod/codecs/mod_g711/mod_g711.c b/src/mod/codecs/mod_g711/mod_g711.c index 36b9cd36b4..9ec6a9cbad 100644 --- a/src/mod/codecs/mod_g711/mod_g711.c +++ b/src/mod/codecs/mod_g711/mod_g711.c @@ -26,7 +26,7 @@ * Anthony Minessale II <anthmct@yahoo.com> * * - * mod_g711codec.c -- G711 Ulaw/Alaw Codec Module + * mod_g711.c -- G711 Ulaw/Alaw Codec Module * */ #include <switch.h> diff --git a/src/mod/codecs/mod_g723_1/mod_g723_1.c b/src/mod/codecs/mod_g723_1/mod_g723_1.c index 2dcb16913d..78afa6322d 100644 --- a/src/mod/codecs/mod_g723_1/mod_g723_1.c +++ b/src/mod/codecs/mod_g723_1/mod_g723_1.c @@ -28,7 +28,7 @@ * * The g723.1 codec itself is not distributed with this module. * - * mod_g723.c -- G723.1 Codec Module + * mod_g723_1.c -- G723.1 Codec Module * */ #include "switch.h" @@ -97,7 +97,6 @@ static switch_status_t switch_g723_init(switch_codec_t *codec, switch_codec_flag #endif } - static switch_status_t switch_g723_destroy(switch_codec_t *codec) { #ifndef G723_PASSTHROUGH diff --git a/src/mod/codecs/mod_g726/mod_g726.c b/src/mod/codecs/mod_g726/mod_g726.c index 11d4781d49..047b00b96a 100644 --- a/src/mod/codecs/mod_g726/mod_g726.c +++ b/src/mod/codecs/mod_g726/mod_g726.c @@ -39,7 +39,6 @@ SWITCH_MODULE_DEFINITION(mod_g726, mod_g726_load, NULL, NULL); typedef int (*encoder_t) (int, int, g726_state *); typedef int (*decoder_t) (int, int, g726_state *); - typedef struct { g726_state context; switch_byte_t bits_per_frame; @@ -101,15 +100,12 @@ static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag } } - static switch_status_t switch_g726_destroy(switch_codec_t *codec) { codec->private_info = NULL; return SWITCH_STATUS_SUCCESS; } - - static switch_status_t switch_g726_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, @@ -117,11 +113,9 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec, uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) { - g726_handle_t *handle = codec->private_info; g726_state *context = &handle->context; uint32_t len = codec->implementation->bytes_per_frame; - //uint32_t elen = codec->implementation->encoded_bytes_per_frame; if (!context) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error!\n"); @@ -155,8 +149,6 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec, return SWITCH_STATUS_SUCCESS; } - - static switch_status_t switch_g726_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, @@ -164,7 +156,6 @@ static switch_status_t switch_g726_decode(switch_codec_t *codec, uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) { - g726_handle_t *handle = codec->private_info; g726_state *context = &handle->context; int16_t *ddp = decoded_data; @@ -195,13 +186,9 @@ static switch_status_t switch_g726_decode(switch_codec_t *codec, return SWITCH_STATUS_FALSE; } - return SWITCH_STATUS_SUCCESS; - } - - /* Registration */ static switch_codec_implementation_t g726_16k_implementation = { @@ -225,7 +212,6 @@ static switch_codec_implementation_t g726_16k_implementation = { /*.destroy */ switch_g726_destroy, }; - static switch_codec_implementation_t g726_24k_implementation = { /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO, /*.ianacode */ 126, @@ -289,8 +275,6 @@ static switch_codec_implementation_t g726_40k_implementation = { /*.destroy */ switch_g726_destroy, }; - - static switch_codec_implementation_t aal2_g726_16k_implementation = { /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO, /*.ianacode */ 124, @@ -312,7 +296,6 @@ static switch_codec_implementation_t aal2_g726_16k_implementation = { /*.destroy */ switch_g726_destroy, }; - static switch_codec_implementation_t aal2_g726_24k_implementation = { /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO, /*.ianacode */ 123, diff --git a/src/mod/codecs/mod_g729/mod_g729.c b/src/mod/codecs/mod_g729/mod_g729.c index 9d453ae1ef..fc0073041c 100644 --- a/src/mod/codecs/mod_g729/mod_g729.c +++ b/src/mod/codecs/mod_g729/mod_g729.c @@ -78,7 +78,6 @@ static switch_status_t switch_g729_init(switch_codec_t *codec, switch_codec_flag codec->private_info = context; return SWITCH_STATUS_SUCCESS; - } #endif } @@ -151,7 +150,6 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec, if (!context) { return SWITCH_STATUS_FALSE; - } if (encoded_data_len % 2 == 0) { @@ -192,11 +190,8 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec, } if (new_len <= *decoded_data_len) { - *decoded_data_len = new_len; - } else { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "buffer overflow!!!\n"); return SWITCH_STATUS_FALSE; diff --git a/src/mod/codecs/mod_gsm/mod_gsm.c b/src/mod/codecs/mod_gsm/mod_gsm.c index 2fdcd6b7ca..d0489bd5fe 100644 --- a/src/mod/codecs/mod_gsm/mod_gsm.c +++ b/src/mod/codecs/mod_gsm/mod_gsm.c @@ -26,7 +26,7 @@ * Anthony Minessale II <anthmct@yahoo.com> * Michael Jerris <mike@jerris.com> * - * mod_codec_gsm.c -- gsm Codec Module + * mod_gsm.c -- gsm Codec Module * */ #include "switch.h" diff --git a/src/mod/codecs/mod_h26x/mod_h26x.c b/src/mod/codecs/mod_h26x/mod_h26x.c index e697dfa813..083ea5d09a 100644 --- a/src/mod/codecs/mod_h26x/mod_h26x.c +++ b/src/mod/codecs/mod_h26x/mod_h26x.c @@ -71,7 +71,6 @@ static switch_status_t switch_h26x_decode(switch_codec_t *codec, static switch_status_t switch_h26x_destroy(switch_codec_t *codec) { - return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/codecs/mod_ilbc/mod_ilbc.c b/src/mod/codecs/mod_ilbc/mod_ilbc.c index 063965410c..493f563bef 100644 --- a/src/mod/codecs/mod_ilbc/mod_ilbc.c +++ b/src/mod/codecs/mod_ilbc/mod_ilbc.c @@ -51,7 +51,6 @@ static switch_status_t switch_ilbc_init(switch_codec_t *codec, switch_codec_flag int encoding, decoding; uint8_t ms = (uint8_t) (codec->implementation->microseconds_per_frame / 1000); - if (ms != 20 && ms != 30) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid speed! (I should never happen)\n"); return SWITCH_STATUS_FALSE; diff --git a/src/mod/codecs/mod_l16/mod_l16.c b/src/mod/codecs/mod_l16/mod_l16.c index f6540d2b5c..606804ce59 100644 --- a/src/mod/codecs/mod_l16/mod_l16.c +++ b/src/mod/codecs/mod_l16/mod_l16.c @@ -26,7 +26,7 @@ * Anthony Minessale II <anthmct@yahoo.com> * * - * mod_rawaudio.c -- Raw Signed Linear Codec + * mod_l16.c -- Raw Signed Linear Codec * */ #include <switch.h>