Commit cc550634 authored by Yaowu Xu's avatar Yaowu Xu

Prevent division-by-zero

Change-Id: Id606669875ef1dcb163ff7dec619dae6110d9047
parent 3e579a60
......@@ -2794,7 +2794,8 @@ static void find_next_key_frame(AV1_COMP *cpi, FIRSTPASS_STATS *this_frame) {
boost_score += (decay_accumulator * frame_boost);
}
}
av_decay_accumulator /= (double)loop_decay_counter;
if (loop_decay_counter > 0)
av_decay_accumulator /= (double)loop_decay_counter;
reset_fpf_position(twopass, start_position);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment