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:
Sebastian Rasmussen 2015-11-02 00:41:28 +01:00 committed by Tim-Philipp Müller
parent 0d57709d38
commit 5091b5f39f

View file

@ -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));
}
#ifdef IPV6_TCLASS
if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) {
GST_ERROR_OBJECT (sink, "could not set TCLASS: %s", g_strerror (errno));
if (g_socket_get_family (socket) == G_SOCKET_FAMILY_IPV6) {
if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) {
GST_ERROR_OBJECT (sink, "could not set TCLASS: %s", g_strerror (errno));
}
}
#endif
}