FS-5807 contd

This commit is contained in:
Anthony Minessale
2013-09-20 23:34:57 +05:00
parent 75da9d1e73
commit 3c83138bb4
5 changed files with 48 additions and 11 deletions
+10 -4
View File
@@ -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;