From 5f4c8b544572033c4ea19bd3af89a1b6620588a3 Mon Sep 17 00:00:00 2001 From: Peng Yixin Date: Sun, 30 Sep 2018 11:01:05 +0800 Subject: [PATCH] media_module: h265: fix video play block issue. PD#174220: After analyzing SPS, we found the value of sps_num_reorder_pics_0 is 0, it is an error value, which also caused the video play block. Change-Id: I6e6d9bccf1284977f64fed9805fd329749fe020c Signed-off-by: Peng Yixin --- .../amlogic/media_modules/frame_provider/decoder/h265/vh265.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c index 31b8a0bbd4b0..f8bb41d2dce5 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c @@ -2558,7 +2558,6 @@ static void init_pic_list(struct hevc_state_s *hevc) int i; int init_buf_num = get_work_pic_num(hevc); int dw_mode = get_double_write_mode(hevc); - /*alloc decoder buf*/ for (i = 0; i < init_buf_num; i++) { if (alloc_buf(hevc) < 0) { @@ -8381,7 +8380,8 @@ pic_done: hevc->lcu_size_log2 = log2i(hevc->lcu_size); if (hevc->pic_w == 0 || hevc->pic_h == 0 || hevc->lcu_size == 0 - || OVER_SIZE(hevc->pic_w, hevc->pic_h)) { + || OVER_SIZE(hevc->pic_w, hevc->pic_h) + || (hevc->param.p.sps_num_reorder_pics_0 == 0)) { /* skip search next start code */ WRITE_VREG(HEVC_WAIT_FLAG, READ_VREG(HEVC_WAIT_FLAG) & (~0x2));