From c75776f42919974e16a5adfae18abecaedd65b79 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Fri, 11 May 2018 17:40:55 +0800 Subject: [PATCH] media_module: fix vmh264 crash issue with teeload mode PD#165463: vmh264: stop vdec in some dec_status Change-Id: I5091f252e1683635fee4302eee97f8af70eb7f95 Signed-off-by: Hui Zhang --- .../frame_provider/decoder/h264_multi/vmh264.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c index 23ab742a04e6..a63e3539cf81 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c @@ -6109,6 +6109,7 @@ result_done: } } decode_frame_count[DECODE_ID(hw)]++; + amvdec_stop(); dpb_print(DECODE_ID(hw), PRINT_FLAG_VDEC_STATUS, "%s dec_result %d %x %x %x\n", __func__, @@ -6133,7 +6134,9 @@ result_done: dpb_print(DECODE_ID(hw), PRINT_FLAG_VDEC_STATUS, "%s: end of stream\n", __func__); - + amvdec_stop(); + if (hw->mmu_enable) + amhevc_stop(); hw->eos = 1; flush_dpb(p_H264_Dpb); vdec_vframe_dirty(hw_to_vdec(hw), hw->chunk); @@ -6222,7 +6225,7 @@ static unsigned long run_ready(struct vdec_s *vdec, unsigned long mask) not_run_ready[DECODE_ID(hw)] = 0; else not_run_ready[DECODE_ID(hw)]++; - return ret; + return ret ? (CORE_MASK_VDEC_1 | CORE_MASK_HEVC) : 0; } static unsigned char get_data_check_sum