]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 22 Jan 2009 00:18:00 +0000 (00:18 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 22 Jan 2009 00:18:00 +0000 (00:18 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11348 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_file.c

index 852f3528429611265635bcb329a3adab13e8a298..02cf50353839552933c3c3e1c4fe9d795670dd4d 100644 (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);