From: Anthony Minessale Date: Thu, 1 Mar 2012 16:04:07 +0000 (-0600) Subject: FS-3957 --resolve X-Git-Tag: v1.2-rc1~19^2^2~68^2~51^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=872a0fe658c3be79aa82c253d6490a60f0ea60c5;p=thirdparty%2Ffreeswitch.git FS-3957 --resolve --- diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index c55ef8adfe..c35540c4f5 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Wed Feb 29 14:45:18 CST 2012 +Thu Mar 1 10:03:45 CST 2012 diff --git a/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c b/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c index 867ca7a79d..3718764718 100644 --- a/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c +++ b/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c @@ -1875,10 +1875,11 @@ sdp_rtpmap_t *sdp_rtpmap_find_matching(sdp_rtpmap_t const *list, sdp_rtpmap_t const *rm) { char const *lparam, *rparam; + sdp_rtpmap_t const *cp_list = NULL; if (rm == NULL) return NULL; - + for (; list; list = list->rm_next) { if (rm->rm_rate != list->rm_rate) continue; @@ -1888,8 +1889,11 @@ sdp_rtpmap_t *sdp_rtpmap_find_matching(sdp_rtpmap_t const *list, lparam = rm->rm_params; rparam = list->rm_params; - if (lparam == rparam) - break; + if (lparam == rparam) { + cp_list = list; + if (rm->rm_pt != list->rm_pt) continue; + break; + } if (!lparam) lparam = "1"; if (!rparam) rparam = "1"; if (!su_casematch(lparam, rparam)) @@ -1898,5 +1902,5 @@ sdp_rtpmap_t *sdp_rtpmap_find_matching(sdp_rtpmap_t const *list, break; } - return (sdp_rtpmap_t *)list; + return cp_list ? (sdp_rtpmap_t *) cp_list : (sdp_rtpmap_t *)list; }