diff options
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/include/pjmedia/sdp_neg.h | 9 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/sdp_neg.c | 7 |
2 files changed, 11 insertions, 5 deletions
diff --git a/pjmedia/include/pjmedia/sdp_neg.h b/pjmedia/include/pjmedia/sdp_neg.h index a17c74ce..d5ed9d27 100644 --- a/pjmedia/include/pjmedia/sdp_neg.h +++ b/pjmedia/include/pjmedia/sdp_neg.h @@ -788,10 +788,11 @@ PJ_DECL(pj_status_t) pjmedia_sdp_neg_register_fmt_match_cb( /** * Match format in the SDP media offer and answer. The matching mechanism - * will be done by comparing the encoding name and clock rate, and if the - * custom format matching callback for the specified format is registered, - * see #pjmedia_sdp_neg_register_fmt_match_cb(), it will be called for more - * detail verification, e.g: format parameters specified in SDP fmtp. + * will be done by comparing the encoding name, clock rate, and encoding + * parameters (if any), and if the custom format matching callback + * for the specified format is registered, see + * #pjmedia_sdp_neg_register_fmt_match_cb(), it will be called for + * more detail verification, e.g: format parameters specified in SDP fmtp. * * @param pool The memory pool. * @param offer The SDP media offer. diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c index 438b3aec..784718c8 100644 --- a/pjmedia/src/pjmedia/sdp_neg.c +++ b/pjmedia/src/pjmedia/sdp_neg.c @@ -1599,7 +1599,12 @@ PJ_DEF(pj_status_t) pjmedia_sdp_neg_fmt_match(pj_pool_t *pool, pjmedia_sdp_attr_get_rtpmap(attr, &a_rtpmap); if (pj_stricmp(&o_rtpmap.enc_name, &a_rtpmap.enc_name) != 0 || - o_rtpmap.clock_rate != a_rtpmap.clock_rate) + (o_rtpmap.clock_rate != a_rtpmap.clock_rate) || + (!(pj_stricmp(&o_rtpmap.param, &a_rtpmap.param) == 0 || + (a_rtpmap.param.slen == 0 && o_rtpmap.param.slen == 1 && + *o_rtpmap.param.ptr == '1') || + (o_rtpmap.param.slen == 0 && a_rtpmap.param.slen == 1 && + *a_rtpmap.param.ptr=='1')))) { return PJMEDIA_SDP_EFORMATNOTEQUAL; } |