Skip to content
Snippets Groups Projects
Commit e098fb18 authored by Matt Jordan's avatar Matt Jordan Committed by Gerrit Code Review
Browse files

Merge "ast_format_cap: Avoid format creation on module load, use cache instead." into 13

parents bd157b9c f3ac4d80
Branches
Tags
No related merge requests found
...@@ -264,7 +264,10 @@ int ast_format_cap_append_by_type(struct ast_format_cap *cap, enum ast_media_typ ...@@ -264,7 +264,10 @@ int ast_format_cap_append_by_type(struct ast_format_cap *cap, enum ast_media_typ
continue; continue;
} }
format = ast_format_create(codec); format = ast_format_cache_get(codec->name);
if (!format || (codec != ast_format_get_codec(format))) {
format = ast_format_create(codec);
}
ao2_ref(codec, -1); ao2_ref(codec, -1);
if (!format) { if (!format) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment