# HG changeset patch # User voroshil # Date 1192499614 0 # Node ID 5d7f6e5e08472a94158a4a74c01a776dbb969cc9 # Parent 1ed81edfac75e33f07050aca882a4e5e481f50e9 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 diff -r 1ed81edfac75 -r 5d7f6e5e0847 stream/tvi_v4l.c --- a/stream/tvi_v4l.c Mon Oct 15 17:46:17 2007 +0000 +++ b/stream/tvi_v4l.c Tue Oct 16 01:53:34 2007 +0000 @@ -867,6 +867,8 @@ 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 -r 1ed81edfac75 -r 5d7f6e5e0847 stream/tvi_v4l2.c --- a/stream/tvi_v4l2.c Mon Oct 15 17:46:17 2007 +0000 +++ b/stream/tvi_v4l2.c Tue Oct 16 01:53:34 2007 +0000 @@ -662,6 +662,8 @@ 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;