mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
use ast_pthread_create_detached_background() instead of redoing
it with separate calls git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1087,10 +1087,9 @@ void console_video_start(struct video_desc *env, struct ast_channel *owner)
|
|||||||
env->out.bitrate = 65000;
|
env->out.bitrate = 65000;
|
||||||
ast_log(LOG_WARNING, "bitrate unset, forcing to %d\n", env->out.bitrate);
|
ast_log(LOG_WARNING, "bitrate unset, forcing to %d\n", env->out.bitrate);
|
||||||
}
|
}
|
||||||
/* XXX below probably can use ast_pthread_create_detace\hed() */
|
/* create the thread as detached so memory is freed on termination */
|
||||||
ast_pthread_create_background(&env->vthread, NULL, video_thread, env);
|
ast_pthread_create_detached_background(&env->vthread,
|
||||||
/* detach the thread to make sure memory is freed on termination */
|
NULL, video_thread, env);
|
||||||
pthread_detach(env->vthread);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user