[MPlayer-cvslog] CVS: main/libmpdemux tvi_v4l2.c,1.26,1.27
Sascha Sommer CVS
syncmail at mplayerhq.hu
Sat Aug 6 20:20:00 CEST 2005
CVS change done by Sascha Sommer CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv8003/libmpdemux
Modified Files:
tvi_v4l2.c
Log Message:
do not crash when /dev/video0 is not present
Index: tvi_v4l2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_v4l2.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- tvi_v4l2.c 17 Jul 2005 00:41:29 -0000 1.26
+++ tvi_v4l2.c 6 Aug 2005 18:19:58 -0000 1.27
@@ -857,7 +857,8 @@
int i, frames, dropped = 0;
priv->shutdown = 1;
- pthread_join(priv->video_grabber_thread, NULL);
+ if(priv->video_grabber_thread)
+ pthread_join(priv->video_grabber_thread, NULL);
pthread_mutex_destroy(&priv->video_buffer_mutex);
if (priv->streamon) {
@@ -906,7 +907,7 @@
/* free memory and close device */
free(priv->map); priv->map = NULL;
priv->mapcount = 0;
- close(priv->video_fd); priv->video_fd = -1;
+ if(priv->video_fd!=-1)close(priv->video_fd); priv->video_fd = -1;
free(priv->video_dev); priv->video_dev = NULL;
if (priv->video_ringbuffer) {
More information about the MPlayer-cvslog
mailing list