[Freeswitch-svn] [commit] r11348 - freeswitch/trunk/src

FreeSWITCH SVN anthm at freeswitch.org
Wed Jan 21 16:18:00 PST 2009


Author: anthm
Date: Wed Jan 21 18:18:00 2009
New Revision: 11348

Log:
update

Modified:
   freeswitch/trunk/src/switch_core_file.c

Modified: freeswitch/trunk/src/switch_core_file.c
==============================================================================
--- freeswitch/trunk/src/switch_core_file.c	(original)
+++ freeswitch/trunk/src/switch_core_file.c	Wed Jan 21 18:18:00 2009
@@ -221,8 +221,8 @@
 				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);



More information about the Freeswitch-svn mailing list