summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2012-05-21 12:39:39 +0000
committerNanang Izzuddin <nanang@teluu.com>2012-05-21 12:39:39 +0000
commit3952a97f6a2f9586b2cb88c3a352a29e79d612ca (patch)
tree294ca59ff1b3ccdb204cf36450ceb6af8e5f7f46
parent3e3903c9161cb6ae706534f526d285a95079de0e (diff)
Fix #1511: destroy the media transport of the removed media.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4132 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsua-lib/pjsua_media.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index 9e2c4c23..3e83b6a1 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -2232,6 +2232,12 @@ pj_status_t pjsua_media_channel_update(pjsua_call_id call_id,
/* This may happen when remote removed any SDP media lines in
* its re-offer.
*/
+ if (call_med->tp) {
+ /* Close the media transport */
+ pjsua_set_media_tp_state(call_med, PJSUA_MED_TP_NULL);
+ pjmedia_transport_close(call_med->tp);
+ call_med->tp = call_med->tp_orig = NULL;
+ }
continue;
#if 0
/* Something is wrong */