From: haobin.zhu Date: Fri, 30 Oct 2020 07:38:00 +0000 (+0800) Subject: h265: add variable judgment [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=79434c52a21aa6b503524a6733c0a8abb7d9cca0;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git 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 --- 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,