From 92651b6529432c02047fc5ec1dfe6e4f9191f962 Mon Sep 17 00:00:00 2001 From: miaohong chen Date: Fri, 8 Jan 2021 15:03:12 +0800 Subject: [PATCH] mpeg2: Optimize frame put strategy [1/1] PD#SWPL-39398 Problem: Due to some errors, the frame status is incorrect, causing the decoder to get stuck. Solution: Set it to 0 when the use index is abnormal to avoid getting stuck. Verify: AH212 Change-Id: I6048fcf2bed99c39012ebce9339bdd87cf4ae78c Signed-off-by: miaohong chen --- drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c b/drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c index c258cb4..db7a285 100644 --- a/drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c +++ b/drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c @@ -2510,7 +2510,8 @@ static void vmpeg_vf_put(struct vframe_s *vf, void *op_arg) hw->vfbuf_use[vf->index]--; if (hw->vfbuf_use[vf->index] < 0) { debug_print(DECODE_ID(hw), PRINT_FLAG_ERROR, - "warn: vf %lx, index %d putback repetitive\n", (ulong)vf, vf->index); + "warn: vf %lx, index %d putback repetitive, set use to 0\n", (ulong)vf, vf->index); + hw->vfbuf_use[vf->index] = 0; } hw->put_num++; debug_print(DECODE_ID(hw), PRINT_FLAG_RUN_FLOW, -- 2.20.1