diff stream/tvi_v4l2.c @ 24763:5d7f6e5e0847

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
author voroshil
date Tue, 16 Oct 2007 01:53:34 +0000
parents d6bba2781d01
children 1635b2b31bdd
line wrap: on
line diff
--- 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;