[MPlayer-cvslog] r24791 - in trunk/stream: tvi_v4l.c tvi_v4l2.c

voroshil subversion at mplayerhq.hu
Tue Oct 16 03:53:35 CEST 2007


Author: voroshil
Date: Tue Oct 16 03:53:34 2007
New Revision: 24791

Log:
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



Modified:
   trunk/stream/tvi_v4l.c
   trunk/stream/tvi_v4l2.c

Modified: trunk/stream/tvi_v4l.c
==============================================================================
--- trunk/stream/tvi_v4l.c	(original)
+++ trunk/stream/tvi_v4l.c	Tue Oct 16 03:53:34 2007
@@ -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;

Modified: trunk/stream/tvi_v4l2.c
==============================================================================
--- trunk/stream/tvi_v4l2.c	(original)
+++ trunk/stream/tvi_v4l2.c	Tue Oct 16 03:53:34 2007
@@ -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;



More information about the MPlayer-cvslog mailing list