diff options
author | Liong Sauw Ming <ming@teluu.com> | 2015-02-11 02:13:04 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2015-02-11 02:13:04 +0000 |
commit | 4a278132621eafe2c1a9f86d7aab6455ba774b25 (patch) | |
tree | 37e1811dbdc9c1df96ed2ac79661b3fe909c291f /pjsip | |
parent | 69069125c15decd14dabf0d419c608a9d9021f05 (diff) |
Fixed #1813: Problem with media reinitialisation when using ICE
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4980 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_media.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index 61f76dee..6b024a61 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -1360,6 +1360,12 @@ pj_status_t pjsua_call_media_init(pjsua_call_media *call_med, * the unused transport of a disabled media. */ if (call_med->tp == NULL) { + /* Initializations. If media transport creation completes immediately, + * we don't need to call the callbacks. + */ + call_med->med_init_cb = NULL; + call_med->med_create_cb = NULL; + #if defined(PJMEDIA_HAS_VIDEO) && (PJMEDIA_HAS_VIDEO != 0) /* While in initial call, set default video devices */ if (type == PJMEDIA_TYPE_VIDEO) { @@ -1393,11 +1399,6 @@ pj_status_t pjsua_call_media_init(pjsua_call_media *call_med, return status; } - /* Media transport creation completed immediately, so - * we don't need to call the callback. - */ - call_med->med_init_cb = NULL; - } else if (call_med->tp_st == PJSUA_MED_TP_DISABLED) { /* Media is being reenabled. */ //pjsua_set_media_tp_state(call_med, PJSUA_MED_TP_IDLE); |