Changeset 5871 for pjproject


Ignore:
Timestamp:
Aug 31, 2018 3:15:23 AM (6 years ago)
Author:
nanang
Message:

Fix #2144: Updated PJSUA media update to work on call->media directly (previously on call->media_prov). Note that at this point (i.e: after SDP nego), PJSUA won't revert media state (back to before SDP nego) on any media update failure.

File:
1 edited

Legend:

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

    r5861 r5871  
    30463046    } 
    30473047 
     3048    /* Update call media from provisional media */ 
     3049    call->med_cnt = call->med_prov_cnt; 
     3050    pj_memcpy(call->media, call->media_prov, 
     3051              sizeof(call->media_prov[0]) * call->med_prov_cnt); 
     3052 
    30483053    /* Process each media stream */ 
    3049     for (mi=0; mi < call->med_prov_cnt; ++mi) { 
    3050         pjsua_call_media *call_med = &call->media_prov[mi]; 
     3054    for (mi=0; mi < call->med_cnt; ++mi) { 
     3055        pjsua_call_media *call_med = &call->media[mi]; 
    30513056        pj_bool_t media_changed = PJ_FALSE; 
    30523057 
     
    34393444    } 
    34403445 
    3441     /* Update call media from provisional media */ 
    3442     call->med_cnt = call->med_prov_cnt; 
    3443     pj_memcpy(call->media, call->media_prov, 
    3444               sizeof(call->media_prov[0]) * call->med_prov_cnt); 
     3446    /* Sync provisional media to call media */ 
     3447    call->med_prov_cnt = call->med_cnt; 
     3448    pj_memcpy(call->media_prov, call->media, 
     3449              sizeof(call->media[0]) * call->med_cnt); 
    34453450 
    34463451    /* Perform SDP re-negotiation. */ 
Note: See TracChangeset for help on using the changeset viewer.