[Asterisk-code-review] res pjsip sdp rtp: Fix opus pass-through (asterisk[13])

Matt Jordan asteriskteam at digium.com
Fri May 8 16:01:57 CDT 2015


Matt Jordan has posted comments on this change.

Change subject: res_pjsip_sdp_rtp: Fix opus pass-through
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/407/1/res/res_pjsip_sdp_rtp.c
File res/res_pjsip_sdp_rtp.c:

Line 319: 
        : 	if (!pj_stricmp2(&rtpmap.enc_name, "opus")) {
        : 		rtpmap.param.slen = 1;
        : 		rtpmap.param.ptr = "2";
        : 	} else {
        : 		rtpmap.param.slen = 0;
        : 		rtpmap.param.ptr = NULL;
        : 	}
I think you can just use pj_cstr for this:

pj_cstr(&rtpmap.param, "2");

The same would also be true for the NULL case, as pj_cstr is NULL tolerant:

pj_cstr(&rtpmap.param, NULL);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieff1ccf4af6ec0c7d20f6f85b4dbe365d9431436
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list