Author: mikej Date: Mon Jun 30 13:52:22 2008 New Revision: 8863 Modified: freeswitch/trunk/src/include/switch_types.h freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c Log: don't seg when using more than SWITCH_MAX_CODECS and bump SWITCH_MAX_CODECS to 50 (we have more than 30 in tree) (MODFORM-10) Modified: freeswitch/trunk/src/include/switch_types.h ============================================================================== --- freeswitch/trunk/src/include/switch_types.h (original) +++ freeswitch/trunk/src/include/switch_types.h Mon Jun 30 13:52:22 2008 @@ -332,7 +332,7 @@ #define SWITCH_MAX_SAMPLE_LEN 32 #define SWITCH_BYTES_PER_SAMPLE 2 /* slin is 2 bytes per sample */ #define SWITCH_RECOMMENDED_BUFFER_SIZE (SWITCH_BYTES_PER_SAMPLE * SWITCH_MAX_SAMPLE_LEN * (SWITCH_MAX_INTERVAL + SWITCH_INTERVAL_PAD)) -#define SWITCH_MAX_CODECS 30 +#define SWITCH_MAX_CODECS 50 #define SWITCH_MAX_STATE_HANDLERS 30 #define SWITCH_CORE_QUEUE_LEN 100000 #define SWITCH_MAX_MANAGEMENT_BUFFER_LEN 1024 * 8 Modified: freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c ============================================================================== --- freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c (original) +++ freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c Mon Jun 30 13:52:22 2008 @@ -132,7 +132,7 @@ /* Registration */ -static char *supported_formats[SWITCH_MAX_CODECS] = { 0 }; +static char *supported_formats[SWITCH_MAX_CODECS + 1] = { 0 }; SWITCH_MODULE_LOAD_FUNCTION(mod_native_file_load) {