git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6868 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-12-18 17:43:38 +00:00
parent 73f501852c
commit 50326f4d03
1 changed files with 4 additions and 1 deletions

View File

@ -686,7 +686,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
const char *timer_name;
const char *prebuf;
switch_zmalloc(abuf, FILE_STARTSAMPLES);
switch_zmalloc(abuf, FILE_STARTSAMPLES * sizeof(*abuf));
channel = switch_core_session_get_channel(session);
switch_assert(channel != NULL);
@ -925,6 +925,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
}
if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
if (framelen > FILE_STARTSAMPLES) {
framelen = FILE_STARTSAMPLES;
}
memset(abuf, 0, framelen);
olen = ilen;
do_speed = 0;