[Asterisk-code-review] rtp: Don't negotiate dynamic codecs using payload. (asterisk[master])

Jenkins2 asteriskteam at digium.com
Tue Jun 12 10:41:47 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/9177 )

Change subject: rtp: Don't negotiate dynamic codecs using payload.
......................................................................

rtp: Don't negotiate dynamic codecs using payload.

In Asterisk there are some dynamic codecs that have
a fixed payload number. This number was being improperly
used to negotiate the codec, instead of using the name
and sample rate. This could result in the wrong payload
number being negotiated for a codec.

This change makes it so that only static payloads
will be negotiated using their payload number.

ASTERISK-27848

Change-Id: Ia865830170fd3f808cdb33104f3d4c4ffdc77570
---
M main/rtp_engine.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Matthew Fredrickson: Looks good to me, but someone else must approve
  Sean Bright: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index c11027a..3d50774 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -1287,7 +1287,7 @@
 {
 	struct ast_rtp_payload_type *new_type;
 
-	if (payload < 0 || payload >= AST_RTP_MAX_PT) {
+	if (payload < 0 || payload >= AST_RTP_MAX_PT || payload > AST_RTP_PT_LAST_STATIC) {
 		return;
 	}
 

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia865830170fd3f808cdb33104f3d4c4ffdc77570
Gerrit-Change-Number: 9177
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180612/b34167a8/attachment.html>


More information about the asterisk-code-review mailing list