for (i = 0; i < arraylen; i++) {
int this_ptime = array[i]->microseconds_per_packet / 1000;
+
+ if (!strcasecmp(array[i]->iananame, "ilbc")) {
+ this_ptime = 20;
+ }
if (!sorted_ptime) {
sorted_ptime = this_ptime;
for(j = i; j < arraylen; j++) {
int check_ptime = array[j]->microseconds_per_packet / 1000;
+ if (!strcasecmp(array[i]->iananame, "ilbc")) {
+ check_ptime = 20;
+ }
+
if (check_ptime == sorted_ptime) {
#ifdef DEBUG_CODEC_SORTING
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "swap %d %d ptime %d\n", i, j, check_ptime);
SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_implementation_t **array, int arraylen, char **prefs, int preflen)
{
- int x, i = 0;
+ int x, i = 0, j = 0;
switch_codec_interface_t *codec_interface;
const switch_codec_implementation_t *imp;
char *cur, *next = NULL, *name, *p, buf[256];
uint32_t interval = 0, rate = 0, bit = 0;
+ for(j = 0; j < x; j++) {
+ if (!strcasecmp(prefs[j], prefs[x])) {
+ goto next_x;
+ }
+ }
+
switch_copy_string(buf, prefs[x], sizeof(buf));
name = next = cur = buf;
}
}
+
+ next_x:
+
+ continue;
}
switch_mutex_unlock(loadable_modules.mutex);