allow enable_file_write_buffering to alternatively allow you to set the exact size of the pre buffer
This commit is contained in:
parent
7eba3f2b1c
commit
25dd668af2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue