提交 2b5f40b3 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-8811 #resolve [FS 1.7 crashes intermittently]

上级 a0841e86
......@@ -292,7 +292,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file,
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Spool dir is set. Make sure [%s] is also a valid path\n", fh->spool_path);
}
UNPROTECT_INTERFACE(fh->file_interface);
switch_goto_status(status, fail);
goto fail;
}
fh->real_channels = fh->channels;
......@@ -305,7 +305,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file,
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "File [%s] not created!\n", file_path);
fh->file_interface->file_close(fh);
UNPROTECT_INTERFACE(fh->file_interface);
switch_goto_status(status, fail);
goto fail;
}
if (to) {
......
......@@ -333,6 +333,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
time_t answer_limit = 0;
const char *exec_app = NULL;
const char *exec_data = NULL;
switch_codec_implementation_t read_impl = { 0 };
#ifdef SWITCH_VIDEO_IN_THREADS
struct vid_helper vh = { 0 };
......@@ -345,6 +346,9 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
return NULL;
}
switch_core_session_get_read_impl(session_a, &read_impl);
input_callback = data->input_callback;
user_data = data->session_data;
stream_id = data->stream_id;
......@@ -405,8 +409,6 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
}
if ((silence_var = switch_channel_get_variable(chan_a, "bridge_generate_comfort_noise"))) {
switch_codec_implementation_t read_impl = { 0 };
switch_core_session_get_read_impl(session_a, &read_impl);
if (!switch_channel_media_up(chan_a)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session_a), SWITCH_LOG_ERROR, "Channel has no media!\n");
......@@ -683,7 +685,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
if (switch_test_flag(read_frame, SFF_CNG)) {
if (silence_val) {
switch_generate_sln_silence((int16_t *) silence_frame.data, silence_frame.samples,
read_frame->codec->implementation->number_of_channels, silence_val);
read_impl.number_of_channels, silence_val);
read_frame = &silence_frame;
} else if (!switch_channel_test_flag(chan_b, CF_ACCEPT_CNG)) {
continue;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论