From 3e40557761a383bdd2092c1880936c67651e17b5 Mon Sep 17 00:00:00 2001 From: Brian West Date: Tue, 13 Jan 2009 05:17:07 +0000 Subject: [PATCH] doh I did that wrong git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11156 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_core_file.c b/src/switch_core_file.c index 0c6ddaedb0..974df9c6a3 100644 --- a/src/switch_core_file.c +++ b/src/switch_core_file.c @@ -204,13 +204,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_read(switch_file_handle_t *fh, switch_resample_process(fh->resampler, fh->resampler->from, fh->resampler->from_len, fh->resampler->to, fh->resampler->to_size, 0); if (fh->resampler->to_len < want || fh->resampler->to_len > orig_len) { - int factor = fh->resampler->to_len * fh->samplerate / 1000; if (!fh->buffer) { + int factor = fh->resampler->to_len * fh->samplerate / 1000; switch_buffer_create_dynamic(&fh->buffer, factor, factor, 0); switch_assert(fh->buffer); } if (!fh->dbuf) { - fh->dbuflen = want * factor; + fh->dbuflen = want * 4; fh->dbuf = switch_core_alloc(fh->memory_pool, fh->dbuflen); } switch_assert(fh->resampler->to_len <= fh->dbuflen);