diff options
author | Liong Sauw Ming <ming@teluu.com> | 2012-08-24 03:49:15 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2012-08-24 03:49:15 +0000 |
commit | 5ccc6632686f68eb0529183faec4aa2bf1555869 (patch) | |
tree | baa635b1c6530b1ac5c8f345d8f3a819a6fc0160 | |
parent | c87b655eba5c93711b665d130819a539e081fa39 (diff) |
Fixed #1572: duplicate transport attributes when modifying video stream call
Only encode the media transport if changing the direction from NONE to !NONE.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4236 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_vid.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_vid.c b/pjsip/src/pjsua-lib/pjsua_vid.c index 6e5a83e9..b818e5f5 100644 --- a/pjsip/src/pjsua-lib/pjsua_vid.c +++ b/pjsip/src/pjsua-lib/pjsua_vid.c @@ -1743,11 +1743,13 @@ static pj_status_t call_modify_video(pjsua_call *call, sdp->media[med_idx] = sdp_m; - /* Update SDP media line by media transport */ - status = pjmedia_transport_encode_sdp(call_med->tp, pool, - sdp, NULL, call_med->idx); - if (status != PJ_SUCCESS) - goto on_error; + if (call_med->dir == PJMEDIA_DIR_NONE) { + /* Update SDP media line by media transport */ + status = pjmedia_transport_encode_sdp(call_med->tp, pool, + sdp, NULL, call_med->idx); + if (status != PJ_SUCCESS) + goto on_error; + } on_error: if (status != PJ_SUCCESS) { |