提交 25dd668a authored 作者: Anthony Minessale's avatar Anthony Minessale

allow enable_file_write_buffering to alternatively allow you to set the exact…

allow enable_file_write_buffering to alternatively allow you to set the exact size of the pre buffer
上级 7eba3f2b
......@@ -1639,10 +1639,19 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t
fh->channels = channels;
vval = switch_channel_get_variable(channel, "enable_file_write_buffering");
if (!vval || switch_true(vval)) {
if ((vval = switch_channel_get_variable(channel, "enable_file_write_buffering"))) {
int tmp = atoi(vval);
if (tmp > 0) {
fh->pre_buffer_datalen = tmp;
} else if (switch_true(vval)) {
fh->pre_buffer_datalen = SWITCH_DEFAULT_FILE_BUFFER_LEN;
}
} else {
fh->pre_buffer_datalen = SWITCH_DEFAULT_FILE_BUFFER_LEN;
}
if (!switch_is_file_path(file)) {
char *tfile = NULL;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论