1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

hw_base_encode: Free pictures on close

Fixes leaking recon surfaces with VAAPI.
This commit is contained in:
David Rosca 2024-10-15 16:49:41 +02:00 committed by Lynne
parent 931d45d4d6
commit 48a1a12968

View File

@ -804,6 +804,11 @@ int ff_hw_base_encode_init(AVCodecContext *avctx, FFHWBaseEncodeContext *ctx)
int ff_hw_base_encode_close(FFHWBaseEncodeContext *ctx)
{
FFHWBaseEncodePicture *pic;
for (pic = ctx->pic_start; pic; pic = pic->next)
base_encode_pic_free(pic);
av_fifo_freep2(&ctx->encode_fifo);
av_frame_free(&ctx->frame);