From: Indrajit Das Date: Fri, 27 May 2016 12:57:15 +0000 (+0530) Subject: radeon/uvd: fix overflow error while calculating bit stream buffer size X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51227b41c6b026f5b0a3925093b91800cdfcc923;p=mesa.git radeon/uvd: fix overflow error while calculating bit stream buffer size Reviewed-by: Christian König --- diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index 97765da69e3..72234175663 100644 --- a/src/gallium/drivers/radeon/radeon_uvd.c +++ b/src/gallium/drivers/radeon/radeon_uvd.c @@ -1233,7 +1233,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context, dec->fb_size = (info.family == CHIP_TONGA) ? FB_BUFFER_SIZE_TONGA : FB_BUFFER_SIZE; - bs_buf_size = width * height * 512 / (16 * 16); + bs_buf_size = width * height * (512 / (16 * 16)); for (i = 0; i < NUM_BUFFERS; ++i) { unsigned msg_fb_it_size = FB_BUFFER_OFFSET + dec->fb_size; STATIC_ASSERT(sizeof(struct ruvd_msg) <= FB_BUFFER_OFFSET);