the intermediate value in the correction_factor calculation may exceed
integer bounds
Bug: b/
189602769
Change-Id: I75726b12f3095663911d78333f3ea26eb6dee21e
/* Work out a size correction factor. */
if (projected_size_based_on_q > 0) {
- correction_factor =
- (100 * cpi->projected_frame_size) / projected_size_based_on_q;
+ correction_factor = (int)((100 * (int64_t)cpi->projected_frame_size) /
+ projected_size_based_on_q);
}
/* More heavily damped adjustment used if we have been oscillating