Ignore:
Timestamp:
Oct 27, 2011 3:33:31 PM (13 years ago)
Author:
nanang
Message:

Close #1404: handle static payload types match in pjmedia_sdp_neg_fmt_match().

File:
1 edited

Legend:

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

    r3856 r3869  
    17381738 
    17391739/* Match format in the SDP media offer and answer. */ 
    1740 PJ_DEF(pj_bool_t) pjmedia_sdp_neg_fmt_match( pj_pool_t *pool, 
    1741                                              pjmedia_sdp_media *offer, 
    1742                                              unsigned o_fmt_idx, 
    1743                                              pjmedia_sdp_media *answer, 
    1744                                              unsigned a_fmt_idx, 
    1745                                              unsigned option) 
     1740PJ_DEF(pj_status_t) pjmedia_sdp_neg_fmt_match(pj_pool_t *pool, 
     1741                                              pjmedia_sdp_media *offer, 
     1742                                              unsigned o_fmt_idx, 
     1743                                              pjmedia_sdp_media *answer, 
     1744                                              unsigned a_fmt_idx, 
     1745                                              unsigned option) 
    17461746{ 
    17471747    const pjmedia_sdp_attr *attr; 
    17481748    pjmedia_sdp_rtpmap o_rtpmap, a_rtpmap; 
     1749    unsigned o_pt; 
     1750    unsigned a_pt; 
     1751 
     1752    o_pt = pj_strtoul(&offer->desc.fmt[o_fmt_idx]); 
     1753    a_pt = pj_strtoul(&answer->desc.fmt[a_fmt_idx]); 
     1754 
     1755    if (o_pt < 96 || a_pt < 96) { 
     1756        if (o_pt == a_pt) 
     1757            return PJ_SUCCESS; 
     1758        else 
     1759            return PJMEDIA_SDP_EFORMATNOTEQUAL; 
     1760    } 
    17491761 
    17501762    /* Get the format rtpmap from the offer. */ 
Note: See TracChangeset for help on using the changeset viewer.