[Mplayer-cvslog] CVS: main/libmpdemux tvi_v4l2.c,1.12,1.13

Jindrich Makovicka CVS syncmail at mplayerhq.hu
Wed Feb 25 12:52:42 CET 2004


CVS change done by Jindrich Makovicka CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv1737

Modified Files:
	tvi_v4l2.c 
Log Message:
missing video thread shutdown, frame count rounding fix

Index: tvi_v4l2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_v4l2.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- tvi_v4l2.c	29 Jan 2004 12:05:24 -0000	1.12
+++ tvi_v4l2.c	25 Feb 2004 11:52:40 -0000	1.13
@@ -785,13 +785,16 @@
     int i, frames, dropped = 0;
 
     priv->shutdown = 1;
+    pthread_join(priv->video_grabber_thread, NULL);
     pthread_mutex_destroy(&priv->video_buffer_mutex);
 
     if (priv->streamon) {
 	struct v4l2_buffer buf;
 
 	/* get performance */
-	frames = 1 + (priv->curr_frame - priv->first_frame) *
+	frames = 1 + (priv->curr_frame - priv->first_frame +
+		      priv->standard.frameperiod.numerator * 500000 /
+		      priv->standard.frameperiod.denominator) *
 	    priv->standard.frameperiod.denominator /
 	    priv->standard.frameperiod.numerator / 1000000;
 	dropped = frames - priv->frames;




More information about the MPlayer-cvslog mailing list