Commit d421ce5d authored by Fiona Glaser's avatar Fiona Glaser

Fix a very rare integer overflow in slicetype analysis

Caused an assert failure when it occurred.
Bug is as old as adaptive B-frames.
parent 07cfdf84
......@@ -349,7 +349,7 @@ static int x264_slicetype_frame_cost( x264_t *h, x264_mb_analysis_t *a,
}
if( b != p1 )
i_score = i_score * 100 / (120 + h->param.i_bframe_bias);
i_score = (uint64_t)i_score * 100 / (120 + h->param.i_bframe_bias);
else
frames[b]->b_intra_calculated = 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