author | yang.xu <yang.xu@amlogic.com> | 2018-03-05 03:02:30 (GMT) |
---|---|---|
committer | yang.xu <yang.xu@amlogic.com> | 2018-03-05 03:02:30 (GMT) |
commit | a48279d8c7c39f6398a3940ce5c1aaf1b3e3a15c (patch) | |
tree | e33f938ea57f812a01fd3fcee65a0e476f316159 | |
parent | ba98e049ed99c6f0f34f576d18cb715a003cee7e (diff) | |
download | media_modules-a48279d8c7c39f6398a3940ce5c1aaf1b3e3a15c.zip media_modules-a48279d8c7c39f6398a3940ce5c1aaf1b3e3a15c.tar.gz media_modules-a48279d8c7c39f6398a3940ce5c1aaf1b3e3a15c.tar.bz2 |
media_module: fix vmh264 playback freeze issue
PD#161180:
1) adjust timeout trigger threshold to prevent an instance not
being in a deadloop when decoding error happened
2) add check to a invalid display_q len
Change-Id: Ifc7f54b1c2cbb2d310efec23d38dbb5b59525f11
-rw-r--r-- | drivers/frame_provider/decoder/h264_multi/vmh264.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c index d8b6b86..daa80cf 100644 --- a/drivers/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c @@ -4232,7 +4232,7 @@ static void check_timer_func(unsigned long arg) } if ((input_frame_based(vdec) || - (READ_VREG(VLD_MEM_VIFIFO_LEVEL) > 0x200)) && + (READ_VREG(VLD_MEM_VIFIFO_LEVEL) > 0x100)) && ((h264_debug_flag & DISABLE_ERROR_HANDLE) == 0) && (timeout_val > 0) && (hw->start_process_time > 0) && @@ -5111,6 +5111,13 @@ static void run(struct vdec_s *vdec, hw->vdec_cb_arg = arg; hw->vdec_cb = callback; + if (kfifo_len(&hw->display_q) > VF_POOL_SIZE) { + hw->reset_bufmgr_flag = 1; + dpb_print(DECODE_ID(hw), 0, + "kfifo len:%d invaild, need bufmgr reset\n", + kfifo_len(&hw->display_q)); + } + if (hw->reset_bufmgr_flag || ((error_proc_policy & 0x40) && p_H264_Dpb->buf_alloc_fail)) { |