Commit 2089b2ce authored by John Koleszar's avatar John Koleszar Committed by Code Review
Browse files

Merge "bug fix possible keyframe context divide by zero"

parents aeca5990 8d5ce819
......@@ -1468,8 +1468,10 @@ static int estimate_keyframe_frequency(VP8_COMP *cpi)
/* Assume a default of 1 kf every 2 seconds, or the max kf interval,
* whichever is smaller.
*/
int key_freq = cpi->oxcf.key_freq>0 ? cpi->oxcf.key_freq : 1;
av_key_frame_frequency = (int)cpi->output_frame_rate * 2;
if (av_key_frame_frequency > cpi->oxcf.key_freq)
if (cpi->oxcf.auto_key && av_key_frame_frequency > key_freq)
av_key_frame_frequency = cpi->oxcf.key_freq;
cpi->prior_key_frame_distance[KEY_FRAME_CONTEXT - 1]
......
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