udpsrc: print information about bind_error socket error

In some cases, a bind error occurs during operation. Printing
the information about the problem is critical for finding the
conflict

https://bugzilla.gnome.org/show_bug.cgi?id=797340
This commit is contained in:
Marc Leeman 2018-05-16 14:15:13 +02:00 committed by Sebastian Dröge
parent e736f29376
commit 827d70daee

View file

@ -1363,8 +1363,10 @@ gst_udpsrc_open (GstUDPSrc * src)
bind_saddr = g_inet_socket_address_new (bind_addr, src->port);
g_object_unref (bind_addr);
if (!g_socket_bind (src->used_socket, bind_saddr, src->reuse, &err))
if (!g_socket_bind (src->used_socket, bind_saddr, src->reuse, &err)) {
GST_ERROR_OBJECT (src, "%s: error binding to %s:%d", err->message, src->address, src->port);
goto bind_error;
}
g_object_unref (bind_saddr);
g_socket_set_multicast_loopback (src->used_socket, src->loop);