mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +00:00
translate.c: Prefer better codecs upon translate ties.
If multiple codecs are available for the same resource and the translation costs between multiple codecs are the same, ties are currently broken arbitrarily, which means a lower quality codec would be used. This forces Asterisk to explicitly use the higher quality codec, ceteris paribus. ASTERISK-29455 Change-Id: I4b7297e1baca7aac14fe4a3c7538e18e2dbe9fd6
This commit is contained in:
committed by
Friendly Automation
parent
80e9e77261
commit
5e35862109
@@ -142,7 +142,7 @@ static char *show_codecs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *
|
||||
"\tIt does not indicate anything about your configuration.\n");
|
||||
}
|
||||
|
||||
ast_cli(a->fd, "%8s %-5s %-12s %-16s %s\n","ID","TYPE","NAME","FORMAT","DESCRIPTION");
|
||||
ast_cli(a->fd, "%8s %-5s %-12s %-16s %7s %s\n","ID","TYPE","NAME","FORMAT","QUALITY", "DESCRIPTION");
|
||||
ast_cli(a->fd, "------------------------------------------------------------------------------------------------\n");
|
||||
|
||||
ao2_rdlock(codecs);
|
||||
@@ -171,11 +171,12 @@ static char *show_codecs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *
|
||||
}
|
||||
}
|
||||
|
||||
ast_cli(a->fd, "%8u %-5s %-12s %-16s (%s)\n",
|
||||
ast_cli(a->fd, "%8u %-5s %-12s %-16s %7d (%s)\n",
|
||||
codec->external.id,
|
||||
ast_codec_media_type2str(codec->external.type),
|
||||
codec->external.name,
|
||||
S_OR(codec->format_name, "no cached format"),
|
||||
codec->external.quality,
|
||||
codec->external.description);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user