From 51227b41c6b026f5b0a3925093b91800cdfcc923 Mon Sep 17 00:00:00 2001 From: Indrajit Das Date: Fri, 27 May 2016 18:27:15 +0530 Subject: radeon/uvd: fix overflow error while calculating bit stream buffer size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Christian König --- src/gallium/drivers/radeon/radeon_uvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3