diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-06-26 08:59:49 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-06-26 08:59:49 +0000 |
commit | 473fe50a16e1109196bfa4affa159e65a8598c08 (patch) | |
tree | 65321760d57e5bde9acd88e91a255657a0b8a3c3 /pjmedia/src | |
parent | 92940328690432692bb7e47e6d900c23d255771e (diff) |
Ticket #342: added configuration to control whether SDP rtpmap should be included for static payload types (default still yes)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1391 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src')
-rw-r--r-- | pjmedia/src/pjmedia/endpoint.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pjmedia/src/pjmedia/endpoint.c b/pjmedia/src/pjmedia/endpoint.c index 5e643512..5848c4a3 100644 --- a/pjmedia/src/pjmedia/endpoint.c +++ b/pjmedia/src/pjmedia/endpoint.c @@ -45,6 +45,10 @@ static const pj_str_t STR_SENDRECV = { "sendrecv", 8 }; */ static int error_subsys_registered; +/* Config to control rtpmap inclusion for static payload types */ +pj_bool_t pjmedia_add_rtpmap_for_static_pt = + PJMEDIA_ADD_RTPMAP_FOR_STATIC_PT; + /** * Defined in pjmedia/errno.c @@ -394,8 +398,10 @@ PJ_DEF(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt, rtpmap.param.slen = 0; } - pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr); - m->attr[m->attr_count++] = attr; + if (codec_info->pt >= 96 || pjmedia_add_rtpmap_for_static_pt) { + pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr); + m->attr[m->attr_count++] = attr; + } /* Add fmtp mode where applicable */ if (codec_param.setting.dec_fmtp_mode != 0) { |