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
parent ff7ee1aa80
commit 9b955c95a9
1 changed files with 1 additions and 1 deletions

View File

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