Changeset 1883 for pjproject/trunk


Ignore:
Timestamp:
Mar 21, 2008 8:56:02 AM (17 years ago)
Author:
bennylp
Message:

More ticket #61: bug in pjsua-lib with SRTP. If call is hold and resumed, SRTP transports will use itself as the underlying transport

File:
1 edited

Legend:

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

    r1874 r1883  
    170170     * reference. 
    171171     */ 
    172     pjsua_var.mconf_cfg.channel_count = 1; 
     172    pjsua_var.mconf_cfg.channel_count = pjsua_var.media_cfg.channel_count; 
    173173    pjsua_var.mconf_cfg.bits_per_sample = 16; 
    174174    pjsua_var.mconf_cfg.samples_per_frame = pjsua_var.media_cfg.clock_rate *  
     
    786786    pjmedia_transport_media_stop(call->med_tp); 
    787787 
     788    /* Close upper entry of transport stack */ 
     789    if (call->med_orig && (call->med_tp != call->med_orig)) { 
     790        pjmedia_transport_close(call->med_tp); 
     791        call->med_tp = call->med_orig; 
     792    } 
     793 
    788794#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 
    789795    /* Check if SRTP requires secure signaling */ 
     
    926932    pjmedia_transport_media_stop(call->med_tp); 
    927933 
    928     if (call->med_tp != call->med_orig) { 
     934    if (call->med_orig && call->med_tp != call->med_orig) { 
    929935        pjmedia_transport_close(call->med_tp); 
    930936        call->med_tp = call->med_orig; 
     
    10221028 
    10231029        /* No need because we need keepalive? */ 
     1030 
     1031        /* Close upper entry of transport stack */ 
     1032        if (call->med_orig && (call->med_tp != call->med_orig)) { 
     1033            pjmedia_transport_close(call->med_tp); 
     1034            call->med_tp = call->med_orig; 
     1035        } 
    10241036 
    10251037    } else { 
     
    18231835        status = pjmedia_snd_port_create(pjsua_var.pool, capture_dev, 
    18241836                                         playback_dev,  
    1825                                          clock_rates[i], 1, 
    1826                                          clock_rates[i]/fps, 
     1837                                         clock_rates[i],  
     1838                                         pjsua_var.media_cfg.channel_count, 
     1839                                         clock_rates[i]/fps *  
     1840                                         pjsua_var.media_cfg.channel_count, 
    18271841                                         16, 0, &pjsua_var.snd_port); 
    18281842 
Note: See TracChangeset for help on using the changeset viewer.