diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-14 16:50:24 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-14 16:50:24 +0000 |
commit | 430782b7be16a620388e5f985a5973ba91af835a (patch) | |
tree | d76e090542a6774ee9d4f286f1949c3dca22b05f /channels/console_video.c | |
parent | 22e3986f8e05a49f5ebd6ad00bf4d6ab546cdac2 (diff) |
use ast_pthread_create_detached_background() instead of redoing
it with separate calls
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130732 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/console_video.c')
-rw-r--r-- | channels/console_video.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/channels/console_video.c b/channels/console_video.c index c82a9034f..a7735a665 100644 --- a/channels/console_video.c +++ b/channels/console_video.c @@ -1087,10 +1087,9 @@ void console_video_start(struct video_desc *env, struct ast_channel *owner) 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); } /* |