[FFmpeg-cvslog] avcodec/qsvenc: Fix leak of A53 data

Andreas Rheinhardt git at videolan.org
Tue Nov 30 18:18:42 EET 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Sep 25 14:05:45 2021 +0200| [e9e2157dda26a08113a146330682f29e6d2accb4] | committer: Andreas Rheinhardt

avcodec/qsvenc: Fix leak of A53 data

Up until now, it has only been freed when the QSVFrame is reused,
so that the last one contained in it leaked at the end.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9e2157dda26a08113a146330682f29e6d2accb4
---

 libavcodec/qsvenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 66f79bb021..e5d09752cb 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1612,6 +1612,7 @@ int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q)
     while (cur) {
         q->work_frames = cur->next;
         av_frame_free(&cur->frame);
+        free_encoder_ctrl_payloads(&cur->enc_ctrl);
         av_freep(&cur);
         cur = q->work_frames;
     }



More information about the ffmpeg-cvslog mailing list