From: Anthony Minessale Date: Tue, 2 Jul 2013 17:16:54 +0000 (-0500) Subject: fix codec negotiation issue with the same codec at multiple rates X-Git-Tag: v1.5.3~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=134871872c458754c11a7e7c399e75e9840d29ed;p=thirdparty%2Ffreeswitch.git fix codec negotiation issue with the same codec at multiple rates --- diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 9270b0b729..4b926ed810 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -2788,7 +2788,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s if ((zstr(map->rm_encoding) || (smh->mparams->ndlb & SM_NDLB_ALLOW_BAD_IANANAME)) && map->rm_pt < 96) { match = (map->rm_pt == imp->ianacode) ? 1 : 0; } else { - match = strcasecmp(rm_encoding, imp->iananame) ? 0 : 1; + match = (!strcasecmp(rm_encoding, imp->iananame) && (map->rm_rate == codec_rate)) ? 1 : 0 } if (match && bit_rate && map_bit_rate && map_bit_rate != bit_rate && strcasecmp(map->rm_encoding, "ilbc") &&