From 389bc359c5b63d91e1e5fe3579a06f236b974964 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 8 Jun 2009 14:45:40 +0000 Subject: [PATCH] fix div by zero git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13669 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_play_say.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index d0c6b7fd1d..c40c20af34 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -1379,7 +1379,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess 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);