[asterisk-commits] rizzo: trunk r130732 - /trunk/channels/console_video.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 14 11:50:24 CDT 2008


Author: rizzo
Date: Mon Jul 14 11:50:24 2008
New Revision: 130732

URL: http://svn.digium.com/view/asterisk?view=rev&rev=130732
Log:
use ast_pthread_create_detached_background() instead of redoing
it with separate calls

Modified:
    trunk/channels/console_video.c

Modified: trunk/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/console_video.c?view=diff&rev=130732&r1=130731&r2=130732
==============================================================================
--- trunk/channels/console_video.c (original)
+++ trunk/channels/console_video.c Mon Jul 14 11:50:24 2008
@@ -1087,10 +1087,9 @@
 		env->out.bitrate = 65000;
 		ast_log(LOG_WARNING, "bitrate unset, forcing to %d\n", env->out.bitrate);
 	}
-	/* XXX below probably can use ast_pthread_create_detace\hed() */
-	ast_pthread_create_background(&env->vthread, NULL, video_thread, env);
-	/* detach the thread to make sure memory is freed on termination */
-	pthread_detach(env->vthread);
+	/* create the thread as detached so memory is freed on termination */
+	ast_pthread_create_detached_background(&env->vthread,
+		NULL, video_thread, env);
 }
 
 /*




More information about the asterisk-commits mailing list