Mercurial > mplayer.hg
changeset 3711:5fa7eb90e2ec
fixed video syncing
author | alex |
---|---|
date | Mon, 24 Dec 2001 13:56:43 +0000 |
parents | f1afa17d807f |
children | d846a89e609a |
files | libmpdemux/tvi_v4l.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/tvi_v4l.c Mon Dec 24 11:26:14 2001 +0000 +++ b/libmpdemux/tvi_v4l.c Mon Dec 24 13:56:43 2001 +0000 @@ -757,9 +757,11 @@ 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",