summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-11-10 14:58:17 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-11-10 14:58:18 -0600
commit0be147f713fba069c403be561dd658799bae2a18 (patch)
treec01b34e14738a42fb3c4936602f45177a69019b6 /main/channel.c
parent02a124eda58808fc50418cbb2217772e47e440e4 (diff)
parentcf79b627789e2c6434419b71508a296c9ee90539 (diff)
Merge "ast_format_cap_get_names: To display all formats, the buffer was increased."
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/channel.c b/main/channel.c
index 3e2636f5a..013d2e281 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -340,7 +340,7 @@ static char *complete_channeltypes(struct ast_cli_args *a)
static char *handle_cli_core_show_channeltype(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
struct chanlist *cl = NULL;
- struct ast_str *codec_buf = ast_str_alloca(256);
+ struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
switch (cmd) {
case CLI_INIT:
@@ -5094,7 +5094,7 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
f = fr;
} else {
if (ast_format_cmp(ast_channel_writeformat(chan), fr->subclass.format) != AST_FORMAT_CMP_EQUAL) {
- struct ast_str *codec_buf = ast_str_alloca(256);
+ struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
/*
* We are not setup to write this frame. Things may have changed
@@ -5435,8 +5435,8 @@ static int set_format(struct ast_channel *chan, struct ast_format_cap *cap_set,
res = ast_translator_best_choice(cap_native, cap_set, &best_native_fmt, &best_set_fmt);
}
if (res < 0) {
- struct ast_str *codec_native = ast_str_alloca(256);
- struct ast_str *codec_set = ast_str_alloca(256);
+ struct ast_str *codec_native = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
+ struct ast_str *codec_set = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
ast_format_cap_get_names(cap_native, &codec_native);
ast_channel_unlock(chan);
@@ -5978,8 +5978,8 @@ struct ast_channel *ast_request(const char *type, struct ast_format_cap *request
res = ast_translator_best_choice(tmp_cap, chan->tech->capabilities, &tmp_fmt, &best_audio_fmt);
ao2_ref(tmp_cap, -1);
if (res < 0) {
- struct ast_str *tech_codecs = ast_str_alloca(64);
- struct ast_str *request_codecs = ast_str_alloca(64);
+ struct ast_str *tech_codecs = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
+ struct ast_str *request_codecs = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
ast_log(LOG_WARNING, "No translator path exists for channel type %s (native %s) to %s\n", type,
ast_format_cap_get_names(chan->tech->capabilities, &tech_codecs),