diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2011-10-03 05:23:59 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2011-10-03 05:23:59 +0000 |
commit | 1685526712e312b701db96c977604343c3550ba1 (patch) | |
tree | 44b0942e67a36496b97cb3fceee64ecdb3d79a94 /pjsip/src/pjsua-lib/pjsua_media.c | |
parent | dd10c1af79c2a0d4d4720245b7f5d28a63a5292c (diff) |
Fix #1358:
- Fixed wrong place of video capture & render event subscription initialization, causing it getting reinitted while being subscribed.
- Moved capture/render event unsubscription to be after capture/render port stopped. Also restart the capturer (after being stopped for unsubsciption & stream detachment) only when the capturer is being used by other, e.g: stream or preview.
- Fixed error handling in pjsua_call_reinvite(), call pjsip_dlg_dec_lock() only if dlg is successfully acquired.
- Minor: added [un]subscribtion log to event.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3778 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_media.c')
-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 5a9530e9..7cd133a4 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -1339,11 +1339,6 @@ static pj_status_t call_media_init_cb(pjsua_call_media *call_med, PJ_UNUSED_ARG(security_level); #endif - pjmedia_event_subscription_init(&call_med->esub_rend, &call_media_on_event, - call_med); - pjmedia_event_subscription_init(&call_med->esub_cap, &call_media_on_event, - call_med); - on_error: if (status != PJ_SUCCESS && call_med->tp) { pjmedia_transport_close(call_med->tp); @@ -1402,6 +1397,12 @@ pj_status_t pjsua_call_media_init(pjsua_call_media *call_med, pjmedia_vid_dev_get_info(call_med->strm.v.cap_dev, &info); call_med->strm.v.cap_dev = info.id; } + + /* Init event subscribtion */ + pjmedia_event_subscription_init(&call_med->esub_rend, &call_media_on_event, + call_med); + pjmedia_event_subscription_init(&call_med->esub_cap, &call_media_on_event, + call_med); } #endif |