diff options
author | Matt Jordan <mjordan@digium.com> | 2015-11-11 08:09:51 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-11-11 08:09:51 -0600 |
commit | dac0bf063c756ce737aa84b246a7c4e6c317b696 (patch) | |
tree | 6b77bf99465eb8923218a666d5f0d51fbf5870f8 /main | |
parent | e07f5a6133cd0133b081163020b3a94f1df484bb (diff) | |
parent | 4bf84459c77227b7adc642d04b9ad93659d96ee2 (diff) |
Merge "rtp_engine: Init a format-attribute module to its RFC defaults." into 13
Diffstat (limited to 'main')
-rw-r--r-- | main/rtp_engine.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/rtp_engine.c b/main/rtp_engine.c index 8ad3d9e77..57a3ef354 100644 --- a/main/rtp_engine.c +++ b/main/rtp_engine.c @@ -727,9 +727,13 @@ int ast_rtp_codecs_payloads_set_rtpmap_type_rate(struct ast_rtp_codecs *codecs, new_type->rtp_code = t->payload_type.rtp_code; if ((ast_format_cmp(t->payload_type.format, ast_format_g726) == AST_FORMAT_CMP_EQUAL) && t->payload_type.asterisk_format && (options & AST_RTP_OPT_G726_NONSTANDARD)) { - new_type->format = ao2_bump(ast_format_g726_aal2); + new_type->format = ast_format_g726_aal2; } else { - new_type->format = ao2_bump(t->payload_type.format); + new_type->format = t->payload_type.format; + } + if (new_type->format) { + /* SDP parsing automatically increases the reference count */ + new_type->format = ast_format_parse_sdp_fmtp(new_type->format, ""); } AST_VECTOR_REPLACE(&codecs->payloads, pt, new_type); |