diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2010-06-03 03:06:03 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2010-06-03 03:06:03 +0000 |
commit | f5a2d53060169500258cdc3bdebd76fe1481ebaf (patch) | |
tree | d677a997aaa038b3f6583338582f560d283eb94f /pjmedia | |
parent | d80a5b1cbe89a082e1ba88795257c9a83cc4e159 (diff) |
Fix #1073:
- Fixed SDP negotiation in processing answer: when the answer has less media count, generate disabled-media to match the media count.
- Added python test.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3195 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-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 5fb160de..8c33468a 100644 --- a/pjmedia/src/pjmedia/sdp_neg.c +++ b/pjmedia/src/pjmedia/sdp_neg.c @@ -1007,6 +1007,15 @@ static pj_status_t process_answer(pj_pool_t *pool, /* Now update each media line in the offer with the answer. */ for (; omi<offer->media_count; ++omi) { if (ami == answer->media_count) { + /* The answer has less media than the offer */ + pjmedia_sdp_media *am; + + /* Generate matching-but-disabled-media for the answer */ + am = pjmedia_sdp_media_clone(pool, offer->media[omi]); + am->desc.port = 0; + answer->media[answer->media_count++] = am; + ++ami; + /* No answer media to be negotiated */ offer->media[omi]->desc.port = 0; continue; |