mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 07:31:22 +01:00
fixup! lavf/rkrga: add RKRGA scale, vpp and overlay filter
Drain the fifo during filter reset to avoid leaking one fence_fd. Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
parent
6b13265d70
commit
377fa2c622
1 changed files with 15 additions and 0 deletions
|
|
@ -1048,10 +1048,25 @@ static void set_rga_async_frame_lock_status(RGAAsyncFrame *frame, int lock)
|
|||
frame->pat->locked = status;
|
||||
}
|
||||
|
||||
static void rga_drain_fifo(RKRGAContext *r)
|
||||
{
|
||||
RGAAsyncFrame aframe;
|
||||
|
||||
while (r->async_fifo && av_fifo_read(r->async_fifo, &aframe, 1) >= 0) {
|
||||
if (imsync(aframe.dst->info.out_fence_fd) != IM_STATUS_SUCCESS)
|
||||
av_log(NULL, AV_LOG_WARNING, "RGA sync failed\n");
|
||||
|
||||
set_rga_async_frame_lock_status(&aframe, 0);
|
||||
}
|
||||
}
|
||||
|
||||
av_cold int ff_rkrga_close(AVFilterContext *avctx)
|
||||
{
|
||||
RKRGAContext *r = avctx->priv;
|
||||
|
||||
/* Drain the fifo during filter reset */
|
||||
rga_drain_fifo(r);
|
||||
|
||||
clear_frame_list(&r->src_frame_list);
|
||||
clear_frame_list(&r->dst_frame_list);
|
||||
clear_frame_list(&r->pat_frame_list);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue