Changeset 2073


Ignore:
Timestamp:
Jun 27, 2008 12:41:56 PM (16 years ago)
Author:
nanang
Message:

Fixed session.c incorrectly parsing channel count from SDP

File:
1 edited

Legend:

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

    r2039 r2073  
    454454         */ 
    455455        if (si->type == PJMEDIA_TYPE_AUDIO && rtpmap->param.slen) { 
    456              
    457             if (rtpmap->param.slen == 2) { 
    458                 si->fmt.channel_cnt = rtpmap->param.ptr[1] - '0'; 
    459             } else { 
    460                 pj_str_t cnt; 
    461                 cnt.ptr = rtpmap->param.ptr + 1; 
    462                 cnt.slen = rtpmap->param.slen - 1; 
    463                 si->fmt.channel_cnt = (unsigned) pj_strtoul(&cnt); 
    464             } 
    465  
     456            si->fmt.channel_cnt = (unsigned) pj_strtoul(&rtpmap->param); 
    466457        } else { 
    467458            si->fmt.channel_cnt = 1; 
Note: See TracChangeset for help on using the changeset viewer.