forked from Mirrors/freeswitch
fix div by zero
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13669 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b85a28e083
commit
389bc359c5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user