mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
systemclock: Only retry writing to the socket for EAGAIN, EWOULDBLOCK and EINTR
Fixes infinite loop in some cases, bug #650002.
This commit is contained in:
parent
9149043e95
commit
cdffc1d5d5
1 changed files with 10 additions and 3 deletions
|
@ -326,9 +326,16 @@ gst_system_clock_add_wakeup (GstSystemClock * sysclock)
|
|||
if (sysclock->priv->wakeup_count == 0) {
|
||||
GST_CAT_DEBUG (GST_CAT_CLOCK, "writing control");
|
||||
while (!gst_poll_write_control (sysclock->priv->timer)) {
|
||||
g_warning
|
||||
("gstsystemclock: write control failed in wakeup_async, trying again : %d:%s\n",
|
||||
errno, g_strerror (errno));
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) {
|
||||
g_warning
|
||||
("gstsystemclock: write control failed in wakeup_async, trying again: %d:%s\n",
|
||||
errno, g_strerror (errno));
|
||||
} else {
|
||||
g_critical
|
||||
("gstsystemclock: write control failed in wakeup_async: %d:%s\n",
|
||||
errno, g_strerror (errno));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
sysclock->priv->wakeup_count++;
|
||||
|
|
Loading…
Reference in a new issue