mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7972 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1043,7 +1043,6 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
} else {
|
||||
if (switch_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION)) {
|
||||
switch_clear_flag_locked(tech_pvt, TFLAG_LATE_NEGOTIATION);
|
||||
|
||||
if (!switch_channel_test_flag(tech_pvt->channel, CF_OUTBOUND)) {
|
||||
const char *r_sdp = switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE);
|
||||
|
||||
|
||||
@@ -1961,6 +1961,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
|
||||
|
||||
for (map = m->m_rtpmaps; map; map = map->rm_next) {
|
||||
int32_t i;
|
||||
uint32_t near_rate = 0;
|
||||
const switch_codec_implementation_t *mimp = NULL, *near_match = NULL;
|
||||
const char *rm_encoding;
|
||||
|
||||
@@ -2018,8 +2019,9 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
|
||||
match = strcasecmp(rm_encoding, imp->iananame) ? 0 : 1;
|
||||
}
|
||||
|
||||
if (match && (map->rm_rate == codec_rate)) {
|
||||
if (ptime && ptime * 1000 != imp->microseconds_per_frame) {
|
||||
if (match) {
|
||||
if ((ptime && ptime * 1000 != imp->microseconds_per_frame) || map->rm_rate != codec_rate) {
|
||||
near_rate = map->rm_rate;
|
||||
near_match = imp;
|
||||
match = 0;
|
||||
continue;
|
||||
@@ -2036,8 +2038,8 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
|
||||
char *prefs[1];
|
||||
char tmp[80];
|
||||
int num;
|
||||
|
||||
switch_snprintf(tmp, sizeof(tmp), "%s@%uk@%ui", near_match->iananame, near_match->samples_per_second, ptime);
|
||||
|
||||
switch_snprintf(tmp, sizeof(tmp), "%s@%uk@%ui", near_match->iananame, near_rate ? near_rate : near_match->samples_per_second, ptime);
|
||||
|
||||
prefs[0] = tmp;
|
||||
num = switch_loadable_module_get_codecs_sorted(search, 1, prefs, 1);
|
||||
@@ -2047,9 +2049,9 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
|
||||
} else {
|
||||
mimp = near_match;
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Substituting codec %s@%ums\n",
|
||||
mimp->iananame, mimp->microseconds_per_frame / 1000);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Substituting codec %s@%ui@%uh\n",
|
||||
mimp->iananame, mimp->microseconds_per_frame / 1000, mimp->samples_per_second);
|
||||
match = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user