Changeset 4776


Ignore:
Timestamp:
Mar 4, 2014 4:25:31 AM (8 years ago)
Author:
ming
Message:

Fixed #1744: Codec and audio device enumeration problem in pjsua2

Location:
pjproject/trunk/pjsip/src/pjsua2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp

    r4704 r4776  
    15621562{ 
    15631563    pjsua_codec_info pj_codec[MAX_CODEC_NUM]; 
    1564     unsigned count = 0; 
     1564    unsigned count = MAX_CODEC_NUM; 
    15651565 
    15661566    PJSUA2_CHECK_EXPR( pjsua_enum_codecs(pj_codec, &count) ); 
     
    15681568    pj_enter_critical_section(); 
    15691569    clearCodecInfoList(); 
    1570     for (unsigned i=0;(i<count && i<MAX_CODEC_NUM);++i) { 
     1570    for (unsigned i=0; i<count; ++i) { 
    15711571        CodecInfo *codec_info = new CodecInfo; 
    15721572 
  • pjproject/trunk/pjsip/src/pjsua2/media.cpp

    r4771 r4776  
    471471{ 
    472472    pjmedia_aud_dev_info pj_info[MAX_DEV_COUNT]; 
    473     unsigned count; 
     473    unsigned count = MAX_DEV_COUNT; 
    474474 
    475475    PJSUA2_CHECK_EXPR( pjsua_enum_aud_devs(pj_info, &count) ); 
     
    477477    pj_enter_critical_section(); 
    478478    clearAudioDevList(); 
    479     for (unsigned i = 0; (i<count && i<MAX_DEV_COUNT) ;++i) { 
     479    for (unsigned i = 0; i<count ;++i) { 
    480480        AudioDevInfo *dev_info = new AudioDevInfo; 
    481481        dev_info->fromPj(pj_info[i]); 
Note: See TracChangeset for help on using the changeset viewer.