[Asterisk-code-review] rtp engine: Init a format-attribute module to its RFC defaults. (asterisk[master])

Alexander Traud asteriskteam at digium.com
Tue Nov 10 09:32:14 CST 2015


Alexander Traud has uploaded a new change for review.

  https://gerrit.asterisk.org/1592

Change subject: rtp_engine: Init a format-attribute module to its RFC defaults.
......................................................................

rtp_engine: Init a format-attribute module to its RFC defaults.

Previously, format-attribute modules relied on an existing fmtp line in SDP
negotiation. However, fmtp is optional for several formats like the Opus Codec.
Now, the format-attribute module is called with an empty fmtp, which allows the
module to initialise itself to RFC defaults. Furthermore now, Asterisk is able
to differentiate between internally and externally created formats.

ASTERISK-25537 #close

Change-Id: I28f680cef7fdf51c0969ff8da71548edad72ec52
---
M main/rtp_engine.c
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/92/1592/1

diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index 1460a7a..1a19610 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -973,9 +973,12 @@
 		if (t->payload_type.asterisk_format
 			&& ast_format_cmp(t->payload_type.format, ast_format_g726) == AST_FORMAT_CMP_EQUAL
 			&& (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) {
+			new_type->format = ast_format_parse_sdp_fmtp(new_type->format, "");
 		}
 
 		if (pt < AST_VECTOR_SIZE(&codecs->payload_mapping_tx)) {

-- 
To view, visit https://gerrit.asterisk.org/1592
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28f680cef7fdf51c0969ff8da71548edad72ec52
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>



More information about the asterisk-code-review mailing list