Changeset 4337


Ignore:
Timestamp:
Jan 29, 2013 8:24:10 AM (6 years ago)
Author:
ming
Message:

Re #1568: (PJSIP 1.x) Apply pjsua_media_config before detecting media change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_media.c

    r4334 r4337  
    16471647     */ 
    16481648    if (old_cp->setting.frm_per_pkt != new_cp->setting.frm_per_pkt || 
    1649         /* old_cp->setting.vad != new_cp->setting.vad || */ 
     1649        old_cp->setting.vad != new_cp->setting.vad || 
    16501650        old_cp->setting.cng != new_cp->setting.cng || 
    16511651        old_cp->setting.plc != new_cp->setting.plc || 
     
    17411741    if (status != PJ_SUCCESS) 
    17421742        return status; 
     1743 
     1744    /* Override ptime, if this option is specified. */ 
     1745    if (pjsua_var.media_cfg.ptime != 0) { 
     1746        si->param->setting.frm_per_pkt = (pj_uint8_t) 
     1747            (pjsua_var.media_cfg.ptime / si->param->info.frm_ptime); 
     1748        if (si->param->setting.frm_per_pkt == 0) 
     1749            si->param->setting.frm_per_pkt = 1; 
     1750    } 
     1751 
     1752    /* Disable VAD, if this option is specified. */ 
     1753    if (pjsua_var.media_cfg.no_vad) { 
     1754        si->param->setting.vad = 0; 
     1755    } 
    17431756 
    17441757    /* Get audio index from the negotiated SDP */ 
     
    18321845                } 
    18331846            } 
    1834         } 
    1835  
    1836         /* Override ptime, if this option is specified. */ 
    1837         if (pjsua_var.media_cfg.ptime != 0) { 
    1838             si->param->setting.frm_per_pkt = (pj_uint8_t) 
    1839                 (pjsua_var.media_cfg.ptime / si->param->info.frm_ptime); 
    1840             if (si->param->setting.frm_per_pkt == 0) 
    1841                 si->param->setting.frm_per_pkt = 1; 
    1842         } 
    1843  
    1844         /* Disable VAD, if this option is specified. */ 
    1845         if (pjsua_var.media_cfg.no_vad) { 
    1846             si->param->setting.vad = 0; 
    18471847        } 
    18481848 
Note: See TracChangeset for help on using the changeset viewer.