Fixes leaking recon surfaces with VAAPI.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -804,6 +804,11 @@ int ff_hw_base_encode_init(AVCodecContext *avctx, FFHWBaseEncodeContext *ctx) · 803 unmodified lines | ||
| 804 | 804 | |
| 805 | 805 | int ff_hw_base_encode_close(FFHWBaseEncodeContext *ctx) |
| 806 | 806 | { |
| 807 | + FFHWBaseEncodePicture *pic; | |
| 808 | + | |
| 809 | + for (pic = ctx->pic_start; pic; pic = pic->next) | |
| 810 | + base_encode_pic_free(pic); | |
| 811 | + | |
| 807 | 812 | av_fifo_freep2(&ctx->encode_fifo); |
| 808 | 813 | |
| 809 | 814 | av_frame_free(&ctx->frame); |