History

hw_base_encode: Free pictures on close

Fixes leaking recon surfaces with VAAPI.

David Rosca committed 2 years ago

Commit 48a1a121 parent 931d45d1 file · +5 −0Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/hw_base_encode.c+5−0
@@ -804,6 +804,11 @@ int ff_hw_base_encode_init(AVCodecContext *avctx, FFHWBaseEncodeContext *ctx) · 803 unmodified lines
804804
805805 int ff_hw_base_encode_close(FFHWBaseEncodeContext *ctx)
806806 {
807+ FFHWBaseEncodePicture *pic;
808+
809+ for (pic = ctx->pic_start; pic; pic = pic->next)
810+ base_encode_pic_free(pic);
811+
807812 av_fifo_freep2(&ctx->encode_fifo);
808813
809814 av_frame_free(&ctx->frame);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t