mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-14 21:38:34 +00:00
tweak sdp handling
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7799 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
f4c94d962c
commit
7d8bd7ba89
5 files changed
+19
-6
No files matched your search
@@ -565,7 +565,6 @@ static void print_media(sdp_printer_t *p,
|
||||
{
|
||||
char const *media, *proto;
|
||||
sdp_rtpmap_t *rm;
|
||||
int print_rejected = 0;
|
||||
|
||||
sdp_mode_t session_mode = sdp_sendrecv;
|
||||
|
||||
@@ -594,13 +593,11 @@ static void print_media(sdp_printer_t *p,
|
||||
default: proto = m->m_proto_name; break;
|
||||
}
|
||||
|
||||
if (print_rejected || m->m_rtpmaps || m->m_format) {
|
||||
if (m->m_number_of_ports <= 1)
|
||||
sdp_printf(p, "m=%s %u %s", media, m->m_port, proto);
|
||||
else
|
||||
sdp_printf(p, "m=%s %u/%u %s",
|
||||
media, m->m_port, m->m_number_of_ports, proto);
|
||||
}
|
||||
|
||||
if (m->m_rtpmaps) {
|
||||
for (rm = m->m_rtpmaps; rm; rm = rm->rm_next) {
|
||||
@@ -615,13 +612,13 @@ static void print_media(sdp_printer_t *p,
|
||||
for (; l; l = l->l_next)
|
||||
sdp_printf(p, " %s", l->l_text);
|
||||
}
|
||||
else if (print_rejected) {
|
||||
else {
|
||||
sdp_printf(p, " 19"); /* SDP syntax requires at least one format.
|
||||
19 is used by nobody, right?. */
|
||||
}
|
||||
|
||||
|
||||
if (print_rejected || m->m_rtpmaps || m->m_format) sdp_printf(p, CRLF);
|
||||
sdp_printf(p, CRLF);
|
||||
|
||||
if (m->m_information)
|
||||
print_information(p, m->m_information);
|
||||
|
||||
Reference in new issue
Block a user