diff options
author | Sebastian Rasmussen <sebrn@hotmail.com> | 2015-11-02 00:41:28 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2018-01-17 16:09:18 +0200 |
commit | 806103c490c796ad11e067ef3c6993c5ce861216 (patch) | |
tree | 3c43e0880849dcf7cc52a763fcfde8abdc17f5fb | |
parent | 2cc3d98d5cb0f6068f36b429ebf575e188112345 (diff) | |
download | gstreamer-plugins-good-806103c490c796ad11e067ef3c6993c5ce861216.tar.gz |
multiudpsink: don't try to set IPV6_TCLASS on IPV4 sockets
Avoids ERROR log message.
https://bugzilla.gnome.org/show_bug.cgi?id=757449
-rw-r--r-- | gst/udp/gstmultiudpsink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c index 379986cae..f7e0d50a3 100644 --- a/gst/udp/gstmultiudpsink.c +++ b/gst/udp/gstmultiudpsink.c @@ -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 } |