OSDN Git Service

radeon/vce: fix vui time_scale zero error
authorLeo Liu <leo.liu@amd.com>
Fri, 18 Sep 2015 19:51:26 +0000 (15:51 -0400)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 7 Oct 2015 13:42:54 +0000 (14:42 +0100)
if app pass 0 as frame_rate_num, it should not be encoded to the VUI.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 1e97b41893a4f53a71ee141a5e8a046fed7b49cd)

src/gallium/drivers/radeon/radeon_vce_40_2_2.c

index e64fbc7..c005659 100644 (file)
@@ -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