From 79434c52a21aa6b503524a6733c0a8abb7d9cca0 Mon Sep 17 00:00:00 2001 From: "haobin.zhu" Date: Fri, 30 Oct 2020 15:38:00 +0800 Subject: [PATCH] h265: add variable judgment [1/1] 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 --- drivers/frame_provider/decoder/h265/vh265.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index ebac6a3..72833e4 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -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, -- 2.20.1