提交 a8d1a063 authored 作者: Michael Jerris's avatar Michael Jerris

don't try to open failed local_stream's (MODFORM-9)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8704 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 e7f3b950
...@@ -115,6 +115,8 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void ...@@ -115,6 +115,8 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
skip = do_rand(); skip = do_rand();
} }
switch_core_hash_insert(globals.source_hash, source->name, source);
while (RUNNING) { while (RUNNING) {
const char *fname; const char *fname;
...@@ -229,6 +231,8 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void ...@@ -229,6 +231,8 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
} }
done: done:
switch_core_hash_delete(globals.source_hash, source->name);
switch_buffer_destroy(&audio_buffer); switch_buffer_destroy(&audio_buffer);
if (fd > -1) { if (fd > -1) {
...@@ -431,8 +435,6 @@ static void launch_threads(void) ...@@ -431,8 +435,6 @@ static void launch_threads(void)
source->samples = switch_samples_per_frame(source->rate, source->interval); source->samples = switch_samples_per_frame(source->rate, source->interval);
switch_core_hash_insert(globals.source_hash, source->name, source);
switch_mutex_init(&source->mutex, SWITCH_MUTEX_NESTED, source->pool); switch_mutex_init(&source->mutex, SWITCH_MUTEX_NESTED, source->pool);
switch_threadattr_create(&thd_attr, source->pool); switch_threadattr_create(&thd_attr, source->pool);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论