Changeset 4071 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Apr 24, 2012 5:40:32 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r4068 r4071 545 545 call->opt = *opt; 546 546 547 /* Reinit media channel when media count is changed */ 548 if (opt->aud_cnt != old_opt.aud_cnt || 549 opt->vid_cnt != old_opt.vid_cnt) 547 /* Reinit media channel when media count is changed or we are the 548 * answerer (as remote offer may 'extremely' modify the existing 549 * media session, e.g: media type order). 550 */ 551 if (rem_sdp || 552 opt->aud_cnt!=old_opt.aud_cnt || opt->vid_cnt!=old_opt.vid_cnt) 550 553 { 551 554 pjsip_role_e role = rem_sdp? PJSIP_ROLE_UAS : PJSIP_ROLE_UAC; … … 1199 1202 pjsip_dlg_terminate(dlg); 1200 1203 */ 1201 pjsua_media_channel_deinit(call->index);1202 1204 goto on_return; 1203 1205 } … … 1318 1320 if (status != PJ_SUCCESS) { 1319 1321 pjsua_perror(THIS_FILE, "Unable to send 100 response", status); 1322 pjsua_media_channel_deinit(call->index); 1320 1323 goto on_return; 1321 1324 } … … 3225 3228 pjsua_perror(THIS_FILE, "SDP negotiation has failed", status); 3226 3229 3230 /* Clean up provisional media */ 3231 pjsua_media_prov_clean_up(call->index); 3232 3227 3233 /* Do not deinitialize media since this may be a re-INVITE or 3228 3234 * UPDATE (which in this case the media should not get affected … … 3428 3434 call->opt = opt; 3429 3435 } 3430 3436 3431 3437 /* Re-init media for the new remote offer before creating SDP */ 3432 status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAS, 3433 call->secure_level, 3434 call->inv->pool_prov, 3435 offer, NULL, 3436 PJ_FALSE, NULL); 3437 if (status != PJ_SUCCESS) { 3438 pjsua_perror(THIS_FILE, "Error re-initializing media channel", status); 3439 goto on_return; 3440 } 3438 status = apply_call_setting(call, &call->opt, offer); 3439 if (status != PJ_SUCCESS) 3440 goto on_return; 3441 3441 3442 3442 status = pjsua_media_channel_create_sdp(call->index,
Note: See TracChangeset
for help on using the changeset viewer.