mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
udpsrc: Don't error out if we get an ICMP destination-unreachable message when trying to read packets
See bug #529454 and #687782 and commit
751f2bb364
This commit is contained in:
parent
6709a92c70
commit
b86d20e45b
1 changed files with 11 additions and 1 deletions
|
@ -451,8 +451,18 @@ no_select:
|
||||||
g_socket_receive_from (udpsrc->used_socket, &saddr, (gchar *) info.data,
|
g_socket_receive_from (udpsrc->used_socket, &saddr, (gchar *) info.data,
|
||||||
info.size, udpsrc->cancellable, &err);
|
info.size, udpsrc->cancellable, &err);
|
||||||
|
|
||||||
if (G_UNLIKELY (res < 0))
|
if (G_UNLIKELY (res < 0)) {
|
||||||
|
/* EHOSTUNREACH for a UDP socket means that a packet sent with udpsink
|
||||||
|
* generated a "port unreachable" ICMP response. We ignore that and try
|
||||||
|
* again. */
|
||||||
|
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE)) {
|
||||||
|
gst_buffer_unmap (outbuf, &info);
|
||||||
|
gst_buffer_unref (outbuf);
|
||||||
|
outbuf = NULL;
|
||||||
|
goto retry;
|
||||||
|
}
|
||||||
goto receive_error;
|
goto receive_error;
|
||||||
|
}
|
||||||
|
|
||||||
/* patch offset and size when stripping off the headers */
|
/* patch offset and size when stripping off the headers */
|
||||||
if (G_UNLIKELY (udpsrc->skip_first_bytes != 0)) {
|
if (G_UNLIKELY (udpsrc->skip_first_bytes != 0)) {
|
||||||
|
|
Loading…
Reference in a new issue