Changeset 4336


Ignore:
Timestamp:
Jan 29, 2013 8:15:02 AM (7 years ago)
Author:
ming
Message:

Re #1568: (PJSIP 2.x) Apply pjsua_media_config before detecting media change and fixed encoding name string duplication.

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r4278 r4336  
    20042004    pj_memcpy(&stream->si, info, sizeof(*info)); 
    20052005    stream->si.param = pjmedia_codec_param_clone(pool, info->param); 
     2006    pj_strdup(pool, &stream->si.fmt.encoding_name, &info->fmt.encoding_name); 
    20062007 
    20072008    /* Init stream/port name */ 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_aud.c

    r4254 r4336  
    589589    /* Check if no media is active */ 
    590590    if (si->dir != PJMEDIA_DIR_NONE) { 
    591  
    592         /* Override ptime, if this option is specified. */ 
    593         if (pjsua_var.media_cfg.ptime != 0) { 
    594             si->param->setting.frm_per_pkt = (pj_uint8_t) 
    595                 (pjsua_var.media_cfg.ptime / si->param->info.frm_ptime); 
    596             if (si->param->setting.frm_per_pkt == 0) 
    597                 si->param->setting.frm_per_pkt = 1; 
    598         } 
    599  
    600         /* Disable VAD, if this option is specified. */ 
    601         if (pjsua_var.media_cfg.no_vad) { 
    602             si->param->setting.vad = 0; 
    603         } 
    604  
    605591 
    606592        /* Optionally, application may modify other stream settings here 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r4313 r4336  
    25652565                             call_id, mi)); 
    25662566                continue; 
     2567            } 
     2568 
     2569            /* Override ptime, if this option is specified. */ 
     2570            if (pjsua_var.media_cfg.ptime != 0) { 
     2571                si->param->setting.frm_per_pkt = (pj_uint8_t) 
     2572                    (pjsua_var.media_cfg.ptime / si->param->info.frm_ptime); 
     2573                if (si->param->setting.frm_per_pkt == 0) 
     2574                    si->param->setting.frm_per_pkt = 1; 
     2575            } 
     2576 
     2577            /* Disable VAD, if this option is specified. */ 
     2578            if (pjsua_var.media_cfg.no_vad) { 
     2579                si->param->setting.vad = 0; 
    25672580            } 
    25682581 
Note: See TracChangeset for help on using the changeset viewer.