From 64e0643449da0075b986a288791fb10773ed238f Mon Sep 17 00:00:00 2001 From: Yixin Peng Date: Sun, 1 Dec 2019 16:12:19 +0800 Subject: [PATCH] media_module: fixed some issues for gts. [1/1] PD#SWPL-17322 Problem: h265 seeking test fail. Solution: After seek, Clear the DPB queue. Verify: AC214 Change-Id: I52b6d4b7a64c99916e5ec0efc2ae48619c877a7d Signed-off-by: Yixin Peng --- drivers/frame_provider/decoder/h265/vh265.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index 0f5ca8b..ea12ba1 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -2089,7 +2089,7 @@ static void restore_decode_state(struct hevc_state_s *hevc) static void hevc_init_stru(struct hevc_state_s *hevc, struct BuffInfo_s *buf_spec_i) { - //int i; + int i; INIT_LIST_HEAD(&hevc->log_list); hevc->work_space_buf = buf_spec_i; hevc->prefix_aux_size = 0; @@ -2146,8 +2146,14 @@ static void hevc_init_stru(struct hevc_state_s *hevc, else hevc->ignore_bufmgr_error = 0x0; - /*for (i = 0; i < MAX_REF_PIC_NUM; i++) - hevc->m_PIC[i] = NULL;*/ + if (hevc->is_used_v4l) { + for (i = 0; i < MAX_REF_PIC_NUM; i++) { + if (hevc->m_PIC[i] != NULL) { + memset(hevc->m_PIC[i], 0 ,sizeof(struct PIC_s)); + hevc->m_PIC[i]->index = -1; + } + } + } hevc->pic_num = 0; hevc->lcu_x_num_pre = 0; -- 2.20.1