summaryrefslogtreecommitdiffstats
path: root/libmpdemux/tvi_v4l.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux/tvi_v4l.c')
-rw-r--r--libmpdemux/tvi_v4l.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libmpdemux/tvi_v4l.c b/libmpdemux/tvi_v4l.c
index 428dcbe2f4..fc37a8cc68 100644
--- a/libmpdemux/tvi_v4l.c
+++ b/libmpdemux/tvi_v4l.c
@@ -757,9 +757,11 @@ static int grab_video_frame(priv_t *priv, char *buffer, int len)
mp_msg(MSGT_TV, MSGL_ERR, "ioctl mcapture failed: %s\n", strerror(errno));
return(0);
}
-
- if (ioctl(priv->fd, VIDIOCSYNC, &priv->buf[frame].frame) == -1)
- mp_msg(MSGT_TV, MSGL_ERR, "ioctl sync failed: %s\n", strerror(errno));
+
+ while (ioctl(priv->fd, VIDIOCSYNC, &priv->buf[frame].frame) < 0 &&
+ (errno == EAGAIN || errno == EINTR));
+ mp_dbg(MSGT_TV, MSGL_DBG3, "picture sync failed\n");
+
priv->queue++;
mp_dbg(MSGT_TV, MSGL_DBG3, "mmap: %p + offset: %d => %p\n",