Changeset 4315
- Timestamp:
- Jan 11, 2013 8:53:52 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r4309 r4315 563 563 #endif 564 564 565 call->opt = *opt; 566 565 567 /* If call is established, reinit media channel */ 566 568 if (call->inv && call->inv->state == PJSIP_INV_STATE_CONFIRMED) { 567 pjs ua_call_setting old_opt;569 pjsip_role_e role = rem_sdp? PJSIP_ROLE_UAS : PJSIP_ROLE_UAC; 568 570 pj_status_t status; 569 571 570 old_opt = call->opt; 571 call->opt = *opt; 572 573 /* Reinit media channel when media count is changed or we are the 574 * answerer (as remote offer may 'extremely' modify the existing 575 * media session, e.g: media type order). 576 */ 577 if (rem_sdp || 578 opt->aud_cnt!=old_opt.aud_cnt || opt->vid_cnt!=old_opt.vid_cnt) 579 { 580 pjsip_role_e role = rem_sdp? PJSIP_ROLE_UAS : PJSIP_ROLE_UAC; 581 status = pjsua_media_channel_init(call->index, role, 582 call->secure_level, 583 call->inv->pool_prov, 584 rem_sdp, NULL, 585 PJ_FALSE, NULL); 586 if (status != PJ_SUCCESS) { 587 pjsua_perror(THIS_FILE, "Error re-initializing media channel", 588 status); 589 return status; 590 } 591 } 592 } else { 593 call->opt = *opt; 572 status = pjsua_media_channel_init(call->index, role, 573 call->secure_level, 574 call->inv->pool_prov, 575 rem_sdp, NULL, 576 PJ_FALSE, NULL); 577 if (status != PJ_SUCCESS) { 578 pjsua_perror(THIS_FILE, "Error re-initializing media channel", 579 status); 580 return status; 581 } 594 582 } 595 583
Note: See TracChangeset
for help on using the changeset viewer.