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

FreeSWITCH SVN mikej at freeswitch.org
Mon Jun 8 07:45:40 PDT 2009


Author: mikej
Date: Mon Jun  8 09:45:40 2009
New Revision: 13669

Log:
fix div by zero

Modified:
   freeswitch/trunk/src/switch_ivr_play_say.c

Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c	(original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c	Mon Jun  8 09:45:40 2009
@@ -1379,7 +1379,7 @@
 
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "done playing file\n");
 		
-		switch_channel_set_variable_printf(channel, "playback_ms", "%d", fh->samples_out / read_impl.samples_per_second);
+		if (read_impl.samples_per_second) switch_channel_set_variable_printf(channel, "playback_ms", "%d", fh->samples_out / read_impl.samples_per_second);
 		switch_channel_set_variable_printf(channel, "playback_samples", "%d", fh->samples_out);
 
 		switch_core_file_close(fh);



More information about the Freeswitch-svn mailing list