From: shihong.zheng Date: Thu, 8 Oct 2020 08:19:56 +0000 (+0800) Subject: h264: fix h264 freeze after config decode buf failed. [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2543ae118c53b0d3d65ee2f50856bf53b4f708e9;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git h264: fix h264 freeze after config decode buf failed. [1/1] PD#SWPL-34606 Problem: h264 freeze after config decode buf failed Solution: set init flag 0 after set param failed. Verify: t963 Change-Id: I6f965dc76f341ca38d105d4e25116725e76abee7 Signed-off-by: shihong.zheng --- diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c index bd824c2..b36d8e5 100644 --- a/drivers/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c @@ -9750,6 +9750,8 @@ static void h264_reset_bufmgr(struct vdec_s *vdec) hw->cfg_param3, hw->cfg_param4, true) < 0) hw->stat |= DECODER_FATAL_ERROR_SIZE_OVERFLOW; + else + hw->stat &= (~DECODER_FATAL_ERROR_SIZE_OVERFLOW); /*drop 3 frames after reset bufmgr if bit0 is set 1 */ if (first_i_policy & 0x01) @@ -9757,7 +9759,10 @@ static void h264_reset_bufmgr(struct vdec_s *vdec) p_H264_Dpb->first_insert_frame = FirstInsertFrm_RESET; - hw->init_flag = 1; + if (hw->stat & DECODER_FATAL_ERROR_SIZE_OVERFLOW) + hw->init_flag = 0; + else + hw->init_flag = 1; hw->reset_bufmgr_count++; #endif