mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
fixes adaptive jitterbuffer configuration
When configuring the adaptive jitterbuffer, the target_extra value not only could not be set from the configuration, but was not even being set to its proper default. This value is required in order for the adaptive jitterbuffer to work correctly. To resolve this a config option has been added to expose this value to the conf files, and a default value is provided when no config specific value is present. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -592,6 +592,10 @@ int ast_jb_read_conf(struct ast_jb_conf *conf, const char *varname, const char *
|
||||
} else if (!strcasecmp(name, AST_JB_CONF_IMPL)) {
|
||||
if (!ast_strlen_zero(value))
|
||||
snprintf(conf->impl, sizeof(conf->impl), "%s", value);
|
||||
} else if (!strcasecmp(name, AST_JB_CONF_TARGET_EXTRA)) {
|
||||
if (sscanf(value, "%30d", &tmp) == 1) {
|
||||
conf->target_extra = tmp;
|
||||
}
|
||||
} else if (!strcasecmp(name, AST_JB_CONF_LOG)) {
|
||||
ast_set2_flag(conf, ast_true(value), AST_JB_LOG);
|
||||
} else {
|
||||
@@ -738,6 +742,7 @@ static void *jb_create_adaptive(struct ast_jb_conf *general_config, long resynch
|
||||
jbconf.max_jitterbuf = general_config->max_size;
|
||||
jbconf.resync_threshold = general_config->resync_threshold;
|
||||
jbconf.max_contig_interp = 10;
|
||||
jbconf.target_extra = general_config->target_extra;
|
||||
jb_setconf(adaptivejb, &jbconf);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user