From 1e97b41893a4f53a71ee141a5e8a046fed7b49cd Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Fri, 18 Sep 2015 15:51:26 -0400 Subject: [PATCH] radeon/vce: fix vui time_scale zero error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit if app pass 0 as frame_rate_num, it should not be encoded to the VUI. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Cc: "10.6 11.0" --- src/gallium/drivers/radeon/radeon_vce_40_2_2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c index e64fbc7..c005659 100644 --- a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c +++ b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c @@ -233,6 +233,9 @@ static void vui(struct rvce_encoder *enc) { int i; + if (!enc->pic.rate_ctrl.frame_rate_num) + return; + RVCE_BEGIN(0x04000009); // vui RVCE_CS(0x00000000); //aspectRatioInfoPresentFlag RVCE_CS(0x00000000); //aspectRatioInfo.aspectRatioIdc -- 2.7.4