git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11348 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-01-22 00:18:00 +00:00
parent 40d24053d0
commit 2fd7f0b6bb
1 changed files with 2 additions and 2 deletions

View File

@ -221,8 +221,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_read(switch_file_handle_t *fh,
switch_buffer_create_dynamic(&fh->buffer, factor, factor, 0);
switch_assert(fh->buffer);
}
if (!fh->dbuf) {
fh->dbuflen = want * 8;
if (!fh->dbuf || fh->dbuflen < fh->resampler->to_len * 2) {
fh->dbuflen = fh->resampler->to_len * 2;
fh->dbuf = switch_core_alloc(fh->memory_pool, fh->dbuflen);
}
switch_assert(fh->resampler->to_len <= fh->dbuflen);