diff stream/tvi_v4l.c @ 24759:cdd41bcc9603

Fix mplayer segfault when v4l driver initialization (at setting norm stage) failed.
author voroshil
date Sun, 14 Oct 2007 17:56:29 +0000
parents 9e71e0345c35
children 5d7f6e5e0847
line wrap: on
line diff
--- a/stream/tvi_v4l.c	Sun Oct 14 16:44:32 2007 +0000
+++ b/stream/tvi_v4l.c	Sun Oct 14 17:56:29 2007 +0000
@@ -693,7 +693,9 @@
         pthread_mutex_destroy(&priv->skew_mutex);
     }
     pthread_mutex_destroy(&priv->video_buffer_mutex);
-    pthread_join(priv->video_grabber_thread, NULL);
+    if(priv->video_grabber_thread)
+        pthread_join(priv->video_grabber_thread, NULL);
+
     mp_msg(MSGT_TV, MSGL_V, "done\n");
 
     if (priv->capability.audios) {