From: Wim Taymans Date: Wed, 10 Nov 2010 10:02:27 +0000 (+0100) Subject: sdp: only parse TTL for IP4 addresses X-Git-Tag: RELEASE-0.10.32~178 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=626af3316068f8e9c0d202bce8f861bd3cd505e8;p=platform%2Fupstream%2Fgst-plugins-base.git sdp: only parse TTL for IP4 addresses Only IP4 addresses can have a TTL in the address. --- diff --git a/gst-libs/gst/sdp/gstsdpmessage.c b/gst-libs/gst/sdp/gstsdpmessage.c index c2de249..7d2813a 100644 --- a/gst-libs/gst/sdp/gstsdpmessage.c +++ b/gst-libs/gst/sdp/gstsdpmessage.c @@ -1368,7 +1368,7 @@ gst_sdp_media_as_text (const GstSDPMedia * media) conn->addrtype, conn->address); if (gst_sdp_address_is_multicast (conn->nettype, conn->addrtype, conn->address)) { - /* only add ttl for IP4 multicast */ + /* only add TTL for IP4 multicast */ if (strcmp (conn->addrtype, "IP4") == 0) g_string_append_printf (lines, "/%u", conn->ttl); 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.addrtype); 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); if (c->state == SDP_SESSION) {