diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2011-08-18 18:30:55 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2011-08-18 18:30:55 +0000 |
commit | 6edef3ca3ca375e5917620b3b43adda5649a8363 (patch) | |
tree | b9d7611e0a7062b12e572acf66d2ed20cbae67e0 /pjmedia/src | |
parent | 6f1756b7f6da66525897e307300389894e6243d0 (diff) |
Re #1347: Fixed case 1, 2, and 3 above:
- Generating a deactivated pre-answer media by cloning remote media. There was a case that the media transport in the offer is bad/unrecognized, PJSUA still generated the preanswer with RTP/AVP.
- When generating answer, it should apply max media count (max_audio/video_cnt in account setting) after SDP negotiation instead of in the pjsua_media_channel_init()). This will require PJSUA to perform SDP re-negotiation when the SDP answer get changed.
- Fixed media priority/acceptibility sorting, e.g: media with RTP/SAVP transport still got acceptable score in SRTP disabled mode, this messed up the algorithm of applying max media count setting.
- Fixed SDP negotiator to skip format match in generating answer when the pre-answer provided is deactivated (port 0).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3714 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src')
-rw-r--r-- | pjmedia/src/pjmedia/sdp_neg.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c index e9e822f1..1053b635 100644 --- a/pjmedia/src/pjmedia/sdp_neg.c +++ b/pjmedia/src/pjmedia/sdp_neg.c @@ -1149,6 +1149,15 @@ static pj_status_t match_offer(pj_pool_t *pool, return PJ_SUCCESS; } + /* If the preanswer define zero port, this media is being rejected, + * just clone the preanswer. + */ + if (preanswer->desc.port == 0) { + answer = pjmedia_sdp_media_clone(pool, preanswer); + *p_answer = answer; + return PJ_SUCCESS; + } + /* Set master/slave negotiator based on prefer_remote_codec_order. */ if (prefer_remote_codec_order) { master = offer; |