diff options
author | Joshua Colp <jcolp@digium.com> | 2015-11-12 08:24:06 -0400 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2015-11-12 08:48:42 -0500 |
commit | a159747660932ff442ba737a8addd3268b835147 (patch) | |
tree | 328ccbceadf07cf6e089cb5e66fcc3daea251889 /tests/test_format_cap.c | |
parent | 2954354404e915aa4d20f1ee400c8a3a835fac7b (diff) |
format_cap: Don't append the 'none' format when appending all.
When appending all formats of a type all the codecs are iterated
and added. This operation was incorrectly adding the ast_format_none
format which is special in that it is supposed to be used when no
format is present. It shouldn't be appended.
ASTERISK-25535
Change-Id: I7b00f3bdf4a5f3022e483d6ece602b1e8b12827c
Diffstat (limited to 'tests/test_format_cap.c')
-rw-r--r-- | tests/test_format_cap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_format_cap.c b/tests/test_format_cap.c index b62f6e5d8..1f02c29cd 100644 --- a/tests/test_format_cap.c +++ b/tests/test_format_cap.c @@ -245,7 +245,7 @@ AST_TEST_DEFINE(format_cap_append_all_unknown) } else if (!ast_format_cap_has_type(caps, AST_MEDIA_TYPE_VIDEO)) { ast_test_status_update(test, "Added all media formats but no video formats exist when they should\n"); return AST_TEST_FAIL; - } else if ((ast_format_cap_count(caps) + 1) != ast_codec_get_max()) { + } else if ((ast_format_cap_count(caps) + 1) != (ast_codec_get_max() - 1)) { ast_test_status_update(test, "The number of formats in the capabilities structure does not match known number\n"); return AST_TEST_FAIL; } |