Ignore:
Timestamp:
Dec 6, 2016 7:29:11 AM (8 years ago)
Author:
ming
Message:

Fixed #1982: Add option to reinitialize call media transports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r5329 r5490  
    570570{ 
    571571    opt->flag &= ~(PJSUA_CALL_UNHOLD | PJSUA_CALL_UPDATE_CONTACT | 
    572                    PJSUA_CALL_NO_SDP_OFFER); 
     572                   PJSUA_CALL_NO_SDP_OFFER | PJSUA_CALL_REINIT_MEDIA); 
    573573} 
    574574 
     
    609609    call->opt = *opt; 
    610610 
     611    if (call->opt.flag & PJSUA_CALL_REINIT_MEDIA) { 
     612        pjsua_media_channel_deinit(call->index); 
     613    } 
     614 
    611615    /* If call is established or media channel hasn't been initialized, 
    612616     * reinit media channel. 
     
    614618    if ((call->inv && call->inv->state == PJSIP_INV_STATE_CONNECTING && 
    615619         call->med_cnt == 0) || 
    616         (call->inv && call->inv->state == PJSIP_INV_STATE_CONFIRMED)) 
     620        (call->inv && call->inv->state == PJSIP_INV_STATE_CONFIRMED) || 
     621        (call->opt.flag & PJSUA_CALL_REINIT_MEDIA)) 
    617622    { 
    618623        pjsip_role_e role = rem_sdp? PJSIP_ROLE_UAS : PJSIP_ROLE_UAC; 
Note: See TracChangeset for help on using the changeset viewer.