summaryrefslogtreecommitdiff
path: root/pjmedia/src
diff options
context:
space:
mode:
Diffstat (limited to 'pjmedia/src')
-rw-r--r--pjmedia/src/pjmedia/sdp_neg.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c
index 48a8fc27..f98f9004 100644
--- a/pjmedia/src/pjmedia/sdp_neg.c
+++ b/pjmedia/src/pjmedia/sdp_neg.c
@@ -1737,15 +1737,27 @@ PJ_DECL(pj_status_t) pjmedia_sdp_neg_register_fmt_match_cb(
/* Match format in the SDP media offer and answer. */
-PJ_DEF(pj_bool_t) pjmedia_sdp_neg_fmt_match( pj_pool_t *pool,
- pjmedia_sdp_media *offer,
- unsigned o_fmt_idx,
- pjmedia_sdp_media *answer,
- unsigned a_fmt_idx,
- unsigned option)
+PJ_DEF(pj_status_t) pjmedia_sdp_neg_fmt_match(pj_pool_t *pool,
+ pjmedia_sdp_media *offer,
+ unsigned o_fmt_idx,
+ pjmedia_sdp_media *answer,
+ unsigned a_fmt_idx,
+ unsigned option)
{
const pjmedia_sdp_attr *attr;
pjmedia_sdp_rtpmap o_rtpmap, a_rtpmap;
+ unsigned o_pt;
+ unsigned a_pt;
+
+ o_pt = pj_strtoul(&offer->desc.fmt[o_fmt_idx]);
+ a_pt = pj_strtoul(&answer->desc.fmt[a_fmt_idx]);
+
+ if (o_pt < 96 || a_pt < 96) {
+ if (o_pt == a_pt)
+ return PJ_SUCCESS;
+ else
+ return PJMEDIA_SDP_EFORMATNOTEQUAL;
+ }
/* Get the format rtpmap from the offer. */
attr = pjmedia_sdp_media_find_attr2(offer, "rtpmap",