ast_format_cap_get_names: To display all formats, the buffer was increased.

ASTERISK-25533 #close

Change-Id: Ie1a9d1a6511b3f1a56b93d04475fbf8a4e40010a
This commit is contained in:
Alexander Traud
2015-11-09 10:04:24 +01:00
parent 506aea26e6
commit 1bff400df7
27 changed files with 101 additions and 96 deletions

View File

@@ -443,7 +443,7 @@ static int func_channel_read(struct ast_channel *chan, const char *function,
if (!strcasecmp(data, "audionativeformat")) {
tmpcap = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);
if (tmpcap) {
struct ast_str *codec_buf = ast_str_alloca(128);
struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
ast_channel_lock(chan);
ast_format_cap_append_from_cap(tmpcap, ast_channel_nativeformats(chan), AST_MEDIA_TYPE_AUDIO);
@@ -454,7 +454,7 @@ static int func_channel_read(struct ast_channel *chan, const char *function,
} else if (!strcasecmp(data, "videonativeformat")) {
tmpcap = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);
if (tmpcap) {
struct ast_str *codec_buf = ast_str_alloca(128);
struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
ast_channel_lock(chan);
ast_format_cap_append_from_cap(tmpcap, ast_channel_nativeformats(chan), AST_MEDIA_TYPE_VIDEO);