提交 464d8ab9 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-7431 #resolve

上级 3bbfa9f3
......@@ -48,10 +48,15 @@ static switch_status_t silence_stream_file_open(switch_file_handle_t *handle, co
int ms;
char *p;
sh = switch_core_alloc(handle->memory_pool, sizeof(*sh));
ms = atoi(path);
if (ms == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid Input [%s] Expect <msec>[,<silence_factor>]\n", path);
return SWITCH_STATUS_FALSE;
}
sh = switch_core_alloc(handle->memory_pool, sizeof(*sh));
if (ms > 0) {
sh->samples = (handle->samplerate / 1000) * ms;
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论