Changeset 5114 for pjproject


Ignore:
Timestamp:
Jun 22, 2015 7:33:46 AM (9 years ago)
Author:
ming
Message:

Fixed #1860: Modify pjmedia_sdp_neg_fmt_match() to check for encoding parameters as well

Location:
pjproject/trunk/pjmedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/sdp_neg.h

    r4577 r5114  
    789789/** 
    790790 * Match format in the SDP media offer and answer. The matching mechanism 
    791  * will be done by comparing the encoding name and clock rate, and if the 
    792  * custom format matching callback for the specified format is registered, 
    793  * see #pjmedia_sdp_neg_register_fmt_match_cb(), it will be called for more 
    794  * detail verification, e.g: format parameters specified in SDP fmtp. 
     791 * will be done by comparing the encoding name, clock rate, and encoding 
     792 * parameters (if any), and if the custom format matching callback 
     793 * for the specified format is registered, see 
     794 * #pjmedia_sdp_neg_register_fmt_match_cb(), it will be called for 
     795 * more detail verification, e.g: format parameters specified in SDP fmtp. 
    795796 * 
    796797 * @param pool          The memory pool. 
  • pjproject/trunk/pjmedia/src/pjmedia/sdp_neg.c

    r5045 r5114  
    16001600 
    16011601    if (pj_stricmp(&o_rtpmap.enc_name, &a_rtpmap.enc_name) != 0 || 
    1602         o_rtpmap.clock_rate != a_rtpmap.clock_rate) 
     1602        (o_rtpmap.clock_rate != a_rtpmap.clock_rate) || 
     1603        (!(pj_stricmp(&o_rtpmap.param, &a_rtpmap.param) == 0 || 
     1604           (a_rtpmap.param.slen == 0 && o_rtpmap.param.slen == 1 && 
     1605            *o_rtpmap.param.ptr == '1') || 
     1606           (o_rtpmap.param.slen == 0 && a_rtpmap.param.slen == 1 && 
     1607            *a_rtpmap.param.ptr=='1')))) 
    16031608    { 
    16041609        return PJMEDIA_SDP_EFORMATNOTEQUAL; 
Note: See TracChangeset for help on using the changeset viewer.