]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix codec negotiation issue with the same codec at multiple rates
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 2 Jul 2013 17:16:54 +0000 (12:16 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 2 Jul 2013 17:16:54 +0000 (12:16 -0500)
src/switch_core_media.c

index 9270b0b7290cbf439621d36761e38c01237b68bf..4b926ed81073523fb15b75cc8ef1d46ea9d490e5 100644 (file)
@@ -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") &&