From 938f62373df5c84c4e15d985c90fde5cb84011d6 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 30 Jun 2008 17:52:22 +0000 Subject: [PATCH] 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) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8863 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_types.h | 2 +- src/mod/formats/mod_native_file/mod_native_file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/switch_types.h b/src/include/switch_types.h index baa8271b2f..a5ad3e4c73 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -332,7 +332,7 @@ SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs; #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 diff --git a/src/mod/formats/mod_native_file/mod_native_file.c b/src/mod/formats/mod_native_file/mod_native_file.c index 9767aee20e..3de2422a10 100644 --- a/src/mod/formats/mod_native_file/mod_native_file.c +++ b/src/mod/formats/mod_native_file/mod_native_file.c @@ -132,7 +132,7 @@ static switch_status_t native_file_file_get_string(switch_file_handle_t *handle, /* 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) {