]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
avoid segfault when playing a 48k wav as a transfer ringback to an 8k ulaw channel
authorBrian West <brian@freeswitch.org>
Fri, 9 Jan 2009 03:28:52 +0000 (03:28 +0000)
committerBrian West <brian@freeswitch.org>
Fri, 9 Jan 2009 03:28:52 +0000 (03:28 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11101 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_file.c

index db438f1c48d9206088236631c846a4bae9acc0e0..cc3166133b9aa7b8c1823ba1eadc93e867d568ae 100644 (file)
@@ -165,7 +165,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_read(switch_file_handle_t *fh,
                                switch_assert(fh->buffer);
                        }
                        if (!fh->dbuf) {
-                               fh->dbuflen = fh->resampler->to_len * 8;
+                               fh->dbuflen = fh->resampler->to_len * 10;
                                fh->dbuf = switch_core_alloc(fh->memory_pool, fh->dbuflen);
                        }
                        switch_assert(fh->resampler->to_len <= fh->dbuflen);