more properly handle sdp c lines inside of the audio m line.Resolves jira bug MODENDP-2
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4391 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
20ffa32772
commit
9c3d336223
|
@ -1176,11 +1176,23 @@ static void tech_absorb_sdp(private_object_t *tech_pvt)
|
|||
sdp_parser_t *parser;
|
||||
sdp_session_t *sdp;
|
||||
sdp_media_t *m;
|
||||
sdp_connection_t *connection;
|
||||
|
||||
if ((parser = sdp_parse(tech_pvt->home, sdp_str, (int)strlen(sdp_str), 0))) {
|
||||
if ((sdp = sdp_session(parser))) {
|
||||
for (m = sdp->sdp_media; m ; m = m->m_next) {
|
||||
tech_pvt->proxy_sdp_audio_ip = switch_core_session_strdup(tech_pvt->session, sdp->sdp_connection->c_address);
|
||||
if (m->m_type != sdp_media_audio) {
|
||||
continue;
|
||||
}
|
||||
|
||||
connection = sdp->sdp_connection;
|
||||
if (m->m_connections) {
|
||||
connection = m->m_connections;
|
||||
}
|
||||
|
||||
if (connection) {
|
||||
tech_pvt->proxy_sdp_audio_ip = switch_core_session_strdup(tech_pvt->session, connection->c_address);
|
||||
}
|
||||
tech_pvt->proxy_sdp_audio_port = (switch_port_t)m->m_port;
|
||||
if (tech_pvt->proxy_sdp_audio_ip && tech_pvt->proxy_sdp_audio_port) {
|
||||
break;
|
||||
|
@ -2367,6 +2379,16 @@ static uint8_t negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp)
|
|||
for (m = sdp->sdp_media; m ; m = m->m_next) {
|
||||
sdp_connection_t *connection;
|
||||
|
||||
ptime = dptime;
|
||||
for (a = m->m_attributes; a; a = a->a_next) {
|
||||
if (!strcasecmp(a->a_name, "ptime") && a->a_value) {
|
||||
ptime = atoi(a->a_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (m->m_type == sdp_media_audio) {
|
||||
sdp_rtpmap_t *map;
|
||||
|
||||
connection = sdp->sdp_connection;
|
||||
if (m->m_connections) {
|
||||
connection = m->m_connections;
|
||||
|
@ -2378,16 +2400,6 @@ static uint8_t negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp)
|
|||
break;
|
||||
}
|
||||
|
||||
ptime = dptime;
|
||||
for (a = m->m_attributes; a; a = a->a_next) {
|
||||
if (!strcasecmp(a->a_name, "ptime") && a->a_value) {
|
||||
ptime = atoi(a->a_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (m->m_type == sdp_media_audio) {
|
||||
sdp_rtpmap_t *map;
|
||||
|
||||
for (map = m->m_rtpmaps; map; map = map->rm_next) {
|
||||
int32_t i;
|
||||
const switch_codec_implementation_t *mimp = NULL, *near_match = NULL;
|
||||
|
|
Loading…
Reference in New Issue