The intermediate value in the target bandwidth
calculation may exceed integer bounds.
Bug:
308007926
Change-Id: I8288c5820db06a550d88bf91fccc86106996deaa
Signed-off-by: Xiahong Bao <xiahong.bao@nxp.com>
}
/* lower the target bandwidth for this frame. */
- cpi->this_frame_target -= (cpi->this_frame_target * percent_low) / 200;
+ cpi->this_frame_target -=
+ (int)(((int64_t)cpi->this_frame_target * percent_low) / 200);
/* Are we using allowing control of active_worst_allowed_q
* according to buffer level.