h265: add variable judgment [1/1]
authorhaobin.zhu <haobin.zhu@amlogic.com>
Fri, 30 Oct 2020 07:38:00 +0000 (15:38 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Tue, 10 Nov 2020 07:13:26 +0000 (00:13 -0700)
PD#SWPL-35442

Problem:
play special stream,switch channel,DUT reboot

Solution:
add variable judgment

Verify:
S905X4

Change-Id: Ib45d82429a6ef526e26fd227f4624a6968db3955
Signed-off-by: haobin.zhu <haobin.zhu@amlogic.com>
drivers/frame_provider/decoder/h265/vh265.c

index ebac6a33495f2897558f86b38f63e190f7d7a66f..72833e480d0a99ca21918f66ff430a51a6bc7dc4 100644 (file)
@@ -9679,8 +9679,9 @@ static int prepare_display_buf(struct hevc_state_s *hevc, struct PIC_s *pic)
                        vf->pts, vf->pts_us64,
                        vf->duration);
 #ifdef AUX_DATA_CRC
-               decoder_do_aux_data_check(vdec, hevc->m_PIC[vf->index & 0xff]->aux_data_buf,
-                       hevc->m_PIC[vf->index & 0xff]->aux_data_size);
+               if ((vf->index & 0xff) <= MAX_REF_PIC_NUM)
+                       decoder_do_aux_data_check(vdec, hevc->m_PIC[vf->index & 0xff]->aux_data_buf,
+                               hevc->m_PIC[vf->index & 0xff]->aux_data_size);
 #endif
                if (hevc->is_used_v4l)
                        update_vframe_src_fmt(vf,