From de1f013f2e687c1a2bde754935917e1082735b33 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 23 Apr 2013 18:08:41 -0500 Subject: [PATCH] FS-5331 --- src/switch_core_media.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index ff3b12bf82..ed1ea87ae5 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -2626,14 +2626,12 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s near_rate = map->rm_rate; near_match = imp; near_map = mmap = map; - - if (switch_true(switch_channel_get_variable_dup(channel, "rtp_negotiate_near_match", SWITCH_FALSE, -1))) { - mimp = imp; - mmap = map; - match = 1; - break; - } match = 0; + + if (switch_true(switch_channel_get_variable_dup(channel, "rtp_negotiate_near_match", SWITCH_FALSE, -1))) { + goto near_match; + } + continue; } } @@ -2654,6 +2652,8 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s } } + near_match: + if (!match && near_match) { const switch_codec_implementation_t *search[1]; char *prefs[1];