make local_stream more solid

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8706 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-05-28 15:14:18 +00:00
1 parent 9c8d9e1cde
commit 4eae981ff2
3 files changed
+33 -4

No files matched your search

+3 -1
View File
@@ -1021,7 +1021,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
if (!asis) {
olen /= 2;
}
switch_core_file_read(fh, abuf, &olen);
if (switch_core_file_read(fh, abuf, &olen) != SWITCH_STATUS_SUCCESS) {
break;
}
switch_buffer_write(fh->audio_buffer, abuf, asis ? olen : olen * 2);
olen = switch_buffer_read(fh->audio_buffer, abuf, framelen);
if (!asis) {