mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 23:18:52 +00:00
sdp: only parse TTL for IP4 addresses
Only IP4 addresses can have a TTL in the address.
This commit is contained in:
parent
e0d4a48ae7
commit
626af33160
1 changed files with 4 additions and 2 deletions
|
@ -1368,7 +1368,7 @@ gst_sdp_media_as_text (const GstSDPMedia * media)
|
||||||
conn->addrtype, conn->address);
|
conn->addrtype, conn->address);
|
||||||
if (gst_sdp_address_is_multicast (conn->nettype, conn->addrtype,
|
if (gst_sdp_address_is_multicast (conn->nettype, conn->addrtype,
|
||||||
conn->address)) {
|
conn->address)) {
|
||||||
/* only add ttl for IP4 multicast */
|
/* only add TTL for IP4 multicast */
|
||||||
if (strcmp (conn->addrtype, "IP4") == 0)
|
if (strcmp (conn->addrtype, "IP4") == 0)
|
||||||
g_string_append_printf (lines, "/%u", conn->ttl);
|
g_string_append_printf (lines, "/%u", conn->ttl);
|
||||||
if (conn->addr_number > 1)
|
if (conn->addr_number > 1)
|
||||||
|
@ -1954,7 +1954,9 @@ gst_sdp_parse_line (SDPContext * c, gchar type, gchar * buffer)
|
||||||
READ_STRING (conn.nettype);
|
READ_STRING (conn.nettype);
|
||||||
READ_STRING (conn.addrtype);
|
READ_STRING (conn.addrtype);
|
||||||
READ_STRING (conn.address);
|
READ_STRING (conn.address);
|
||||||
READ_UINT (conn.ttl);
|
/* only read TTL for IP4 */
|
||||||
|
if (strcmp (conn.addrtype, "IP4") == 0)
|
||||||
|
READ_UINT (conn.ttl);
|
||||||
READ_UINT (conn.addr_number);
|
READ_UINT (conn.addr_number);
|
||||||
|
|
||||||
if (c->state == SDP_SESSION) {
|
if (c->state == SDP_SESSION) {
|
||||||
|
|
Loading…
Reference in a new issue