[Mplayer-cvslog] CVS: main/libmpdemux tvi_v4l.c,1.61,1.62

Alban Bedel CVS albeu at mplayerhq.hu
Sun Mar 30 19:06:05 CEST 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv4377/libmpdemux

Modified Files:
	tvi_v4l.c 
Log Message:
10L, close isn't enouth we must munmap too.


Index: tvi_v4l.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_v4l.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- tvi_v4l.c	23 Mar 2003 15:05:14 -0000	1.61
+++ tvi_v4l.c	30 Mar 2003 17:05:58 -0000	1.62
@@ -679,7 +679,15 @@
             mp_msg(MSGT_TV, MSGL_ERR, "\n  MJP: ioctl MJPIOC_QBUF_CAPT failed: %s\n", strerror(errno));
           }
       }
-    close(priv->video_fd);
+    else
+      {
+	// We need to munmap as close don't close mem mappings
+	if(munmap(priv->mmap,priv->mbuf.size))
+	  mp_msg(MSGT_TV, MSGL_ERR, "Munmap failed: %s\n",strerror(errno));
+      }
+
+    if(close(priv->video_fd))
+      mp_msg(MSGT_TV, MSGL_ERR, "Close tv failed: %s\n",strerror(errno));
 
     audio_in_uninit(&priv->audio_in);
 



More information about the MPlayer-cvslog mailing list