summaryrefslogtreecommitdiff
path: root/main/format_cache.c
diff options
context:
space:
mode:
authorAlexander Traud <pabstraud@compuserve.com>2016-07-19 20:14:21 +0200
committerAlexander Traud <pabstraud@compuserve.com>2016-08-24 10:41:58 +0200
commit2e79f52d7116e5529ab78972cee8081b6ffe6878 (patch)
tree6f497fd8eb15a2d02fb24efd944e2bd383555a3e /main/format_cache.c
parent943bb48b59435e00131cbd56b075f73f57d10e87 (diff)
codecs: Add Codec 2 mode 2400.
ASTERISK-26217 #close Change-Id: I1e45d8084683fab5f2b272bf35f4a149cea8b8d6
Diffstat (limited to 'main/format_cache.c')
-rw-r--r--main/format_cache.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main/format_cache.c b/main/format_cache.c
index b4d426092..c704f1c37 100644
--- a/main/format_cache.c
+++ b/main/format_cache.c
@@ -218,6 +218,11 @@ struct ast_format *ast_format_siren7;
struct ast_format *ast_format_opus;
/*!
+ * \brief Built-in cached codec2 format.
+ */
+struct ast_format *ast_format_codec2;
+
+/*!
* \brief Built-in cached t140 format.
*/
struct ast_format *ast_format_t140;
@@ -328,6 +333,7 @@ static void format_cache_shutdown(void)
ao2_replace(ast_format_testlaw, NULL);
ao2_replace(ast_format_g719, NULL);
ao2_replace(ast_format_opus, NULL);
+ ao2_replace(ast_format_codec2, NULL);
ao2_replace(ast_format_jpeg, NULL);
ao2_replace(ast_format_png, NULL);
ao2_replace(ast_format_h261, NULL);
@@ -360,7 +366,9 @@ int ast_format_cache_init(void)
static void set_cached_format(const char *name, struct ast_format *format)
{
- if (!strcmp(name, "g723")) {
+ if (!strcmp(name, "codec2")) {
+ ao2_replace(ast_format_codec2, format);
+ } else if (!strcmp(name, "g723")) {
ao2_replace(ast_format_g723, format);
} else if (!strcmp(name, "ulaw")) {
ao2_replace(ast_format_ulaw, format);