vmh264: fixed vf being output repeatly issue. [2/2]
authorHui Zhang <hui.zhang@amlogic.com>
Fri, 28 Aug 2020 11:36:07 +0000 (19:36 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Sun, 13 Sep 2020 04:09:20 +0000 (21:09 -0700)
commitb304c563ef7a994006b516a25298b5eac029d91c
tree7239c30e07be62823f44ddbb64a0145463421793
parentd04e649b53377aa4116d759e10abda82446c92af
vmh264: fixed vf being output repeatly issue. [2/2]

PD#SWPL-31351

Problem:
sometimes frame was output twice, because there is race
condition between vf_put and get_smallest_poc. so it
need lock to protect critical code

Solution:
add lock to protect critiacl code

Verify:
AC214

Change-Id: I6c7aed70f3a9e3f4d72ff53f5256b117a62c7399
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
drivers/frame_provider/decoder/h264_multi/h264_dpb.c
drivers/frame_provider/decoder/h264_multi/h264_dpb.h
drivers/frame_provider/decoder/h264_multi/vmh264.c