mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
channel.c: Allow generic plc then channel formats are equal
If the two formats on a channel are equal, we don't transcode and since the generic plc needs slin to work, it doesn't get invoked. * A new configuration option "genericplc_on_equal_codecs" was added to the "plc" section of codecs.conf to allow generic packet loss concealment even if no transcoding was originally needed. Transcoding via SLIN is forced in this case. ASTERISK-27743 Change-Id: I0577026a179dea34232e63123254b4e0508378f4
This commit is contained in:
@@ -262,10 +262,19 @@ static int reload_module(void)
|
||||
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
|
||||
if (!strcasecmp(var->name, "genericplc")) {
|
||||
ast_set2_flag(&ast_options, ast_true(var->value), AST_OPT_FLAG_GENERIC_PLC);
|
||||
} else if (!strcasecmp(var->name, "genericplc_on_equal_codecs")) {
|
||||
ast_set2_flag(&ast_options, ast_true(var->value), AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS);
|
||||
}
|
||||
}
|
||||
ast_config_destroy(cfg);
|
||||
|
||||
/*
|
||||
* Force on_equal_codecs to false if generic_plc is false.
|
||||
*/
|
||||
if (!ast_opt_generic_plc) {
|
||||
ast_set2_flag(&ast_options, 0, AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user