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:
parent
931d45d4d6
commit
48a1a12968
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user