1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-03-07 10:48:06 +00:00

FS-9687: segfault Program terminated with signal SIGFPE, Arithmetic exception.

This commit is contained in:
Brian West 2016-11-01 16:50:18 -05:00 committed by Mike Jerris
parent 44b3f7bf18
commit cb382084f0

@ -702,7 +702,7 @@ static switch_status_t switch_opus_destroy(switch_codec_t *codec)
int avg_encoded_bitrate = 0; int avg_encoded_bitrate = 0;
if (session) { if (session) {
if (context->encoder_stats.frame_counter > 0) { if (context->encoder_stats.encoded_bytes > 0 && (context->encoder_stats.encoded_msec > 1000)) {
avg_encoded_bitrate = (context->encoder_stats.encoded_bytes * 8) / (context->encoder_stats.encoded_msec / 1000); avg_encoded_bitrate = (context->encoder_stats.encoded_bytes * 8) / (context->encoder_stats.encoded_msec / 1000);
} }