mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Merge "res_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP."
This commit is contained in:
@@ -396,8 +396,11 @@ static pjmedia_sdp_attr* generate_rtpmap_attr(struct ast_sip_session *session, p
|
||||
rtpmap.pt = media->desc.fmt[media->desc.fmt_count - 1];
|
||||
rtpmap.clock_rate = ast_rtp_lookup_sample_rate2(asterisk_format, format, code);
|
||||
pj_strdup2(pool, &rtpmap.enc_name, ast_rtp_lookup_mime_subtype2(asterisk_format, format, code, options));
|
||||
rtpmap.param.slen = 0;
|
||||
rtpmap.param.ptr = NULL;
|
||||
if (!pj_stricmp2(&rtpmap.enc_name, "opus")) {
|
||||
pj_cstr(&rtpmap.param, "2");
|
||||
} else {
|
||||
pj_cstr(&rtpmap.param, NULL);
|
||||
}
|
||||
|
||||
pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr);
|
||||
|
||||
|
Reference in New Issue
Block a user