Changeset 3842


Ignore:
Timestamp:
Oct 24, 2011 1:31:35 PM (13 years ago)
Author:
bennylp
Message:

Re #1300: fixed bug when looking for non-telephone-events codec in the incoming INVITE causing it to rejects with 488

File:
1 edited

Legend:

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

    r3841 r3842  
    28232823    /* Find the first codec which is not telephone-event */ 
    28242824    for ( fmti = 0; fmti < local_m->desc.fmt_count; ++fmti ) { 
     2825        pjmedia_sdp_rtpmap r; 
     2826 
    28252827        if ( !pj_isdigit(*local_m->desc.fmt[fmti].ptr) ) 
    28262828            return PJMEDIA_EINVALIDPT; 
    28272829        pt = pj_strtoul(&local_m->desc.fmt[fmti]); 
    2828         if ( PJMEDIA_RTP_PT_TELEPHONE_EVENTS == 0 || 
    2829                 pt != PJMEDIA_RTP_PT_TELEPHONE_EVENTS ) 
    2830                 break; 
     2830 
     2831        attr = pjmedia_sdp_media_find_attr(local_m, &ID_RTPMAP, 
     2832                                           &local_m->desc.fmt[fmti]); 
     2833        if (attr == NULL) 
     2834            continue; 
     2835 
     2836        status = pjmedia_sdp_attr_get_rtpmap(attr, &r); 
     2837        if (status != PJ_SUCCESS) 
     2838            continue; 
     2839 
     2840        if (pj_strcmp(&r.enc_name, &ID_TELEPHONE_EVENT) != 0) 
     2841            break; 
    28312842    } 
    28322843    if ( fmti >= local_m->desc.fmt_count ) 
Note: See TracChangeset for help on using the changeset viewer.