mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
FS-5807 contd
This commit is contained in:
@@ -4509,8 +4509,8 @@ static switch_status_t next_file(switch_file_handle_t *handle)
|
||||
}
|
||||
|
||||
handle->samples = context->fh.samples;
|
||||
//handle->samplerate = context->fh.samplerate;
|
||||
//handle->channels = context->fh.channels;
|
||||
handle->cur_samplerate = context->fh.samplerate;
|
||||
handle->cur_channels = context->fh.channels;
|
||||
handle->format = context->fh.format;
|
||||
handle->sections = context->fh.sections;
|
||||
handle->seekable = context->fh.seekable;
|
||||
@@ -4518,6 +4518,7 @@ static switch_status_t next_file(switch_file_handle_t *handle)
|
||||
handle->interval = context->fh.interval;
|
||||
handle->max_samples = 0;
|
||||
|
||||
|
||||
if (switch_test_flag((&context->fh), SWITCH_FILE_NATIVE)) {
|
||||
switch_set_flag(handle, SWITCH_FILE_NATIVE);
|
||||
} else {
|
||||
@@ -4602,8 +4603,13 @@ static switch_status_t file_string_file_read(switch_file_handle_t *handle, void
|
||||
if ((status = next_file(handle)) != SWITCH_STATUS_SUCCESS) {
|
||||
return status;
|
||||
}
|
||||
*len = llen;
|
||||
status = switch_core_file_read(&context->fh, data, len);
|
||||
if (switch_test_flag(handle, SWITCH_FILE_BREAK_ON_CHANGE)) {
|
||||
*len = 0;
|
||||
status = SWITCH_STATUS_BREAK;
|
||||
} else {
|
||||
*len = llen;
|
||||
status = switch_core_file_read(&context->fh, data, len);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
Reference in New Issue
Block a user