media_module: fixed some issues for gts. [1/1]
authorYixin Peng <yixin.peng@amlogic.com>
Sun, 1 Dec 2019 08:12:19 +0000 (16:12 +0800)
committerZhi Zhou <zhi.zhou@amlogic.com>
Sun, 1 Dec 2019 09:26:10 +0000 (02:26 -0700)
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 <yixin.peng@amlogic.com>
drivers/frame_provider/decoder/h265/vh265.c

index 0f5ca8b4c2001adebcbd9b408fbc8d57f83ac872..ea12ba155ce1d2494dab02a766d5a82a537bbb25 100644 (file)
@@ -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;