multiudpsink: don't try to set IPV6_TCLASS on IPV4 sockets
Avoids ERROR log message. https://bugzilla.gnome.org/show_bug.cgi?id=757449
This commit is contained in:
parent
0d57709d38
commit
5091b5f39f
@ -1052,8 +1052,10 @@ gst_multiudpsink_setup_qos_dscp (GstMultiUDPSink * sink, GSocket * socket)
|
|||||||
GST_ERROR_OBJECT (sink, "could not set TOS: %s", g_strerror (errno));
|
GST_ERROR_OBJECT (sink, "could not set TOS: %s", g_strerror (errno));
|
||||||
}
|
}
|
||||||
#ifdef IPV6_TCLASS
|
#ifdef IPV6_TCLASS
|
||||||
if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) {
|
if (g_socket_get_family (socket) == G_SOCKET_FAMILY_IPV6) {
|
||||||
GST_ERROR_OBJECT (sink, "could not set TCLASS: %s", g_strerror (errno));
|
if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) {
|
||||||
|
GST_ERROR_OBJECT (sink, "could not set TCLASS: %s", g_strerror (errno));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user