diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-10-16 01:53:34 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-10-16 01:53:34 +0000 |
commit | 39e5906704211082c8a00d4a30fd02e138c11c36 (patch) | |
tree | 87049985ee5fee6222ff9a6e948810dcbe206926 | |
parent | e3212dafd51ea927633ec1d4b3fc6b46db0a9246 (diff) | |
download | mpv-39e5906704211082c8a00d4a30fd02e138c11c36.tar.bz2 mpv-39e5906704211082c8a00d4a30fd02e138c11c36.tar.xz |
After receiving EINTR 'read' syscall should be restarted.
Fixes receiving teletext on some systems.
Modified patch from Oldrich Jedlicka oldium dot pro at aenam dot cz
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24791 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | stream/tvi_v4l.c | 2 | ||||
-rw-r--r-- | stream/tvi_v4l2.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/stream/tvi_v4l.c b/stream/tvi_v4l.c index c21e13475e..ee1ae60c07 100644 --- a/stream/tvi_v4l.c +++ b/stream/tvi_v4l.c @@ -867,6 +867,8 @@ static void *vbi_grabber(void *data) while (!priv->vbi_shutdown){ bytes=read(priv->vbi_fd,buf,tsp.bufsize); + if(bytes<0 && errno==EINTR) + continue; if (bytes!=tsp.bufsize){ mp_msg(MSGT_TV,MSGL_WARN,"vbi: expecting bytes: %d, got: %d",tsp.bufsize,bytes); break; diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index e049d940dd..989d98f467 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -662,6 +662,8 @@ static void *vbi_grabber(void *data) while (!priv->vbi_shutdown){ bytes=read(priv->vbi_fd,buf,tsp.bufsize); + if(bytes<0 && errno==EINTR) + continue; if (bytes!=tsp.bufsize){ mp_msg(MSGT_TV,MSGL_WARN,"vbi: expecting bytes: %d, got: %d\n",tsp.bufsize,bytes); break; |