mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
hw_base_encode: Free pictures on close
Fixes leaking recon surfaces with VAAPI.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user