summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-07-10 17:47:57 -0300
committerJames Almer <jamrial@gmail.com>2020-07-17 15:24:56 -0300
commit890f2e960ac67af102c0a98af1e5c45ff3274ae5 (patch)
treefa5cdfbbd7b226025ed086c8aa78921763dcf623 /libavcodec/libx264.c
parent03ad76794e23bbbc2a9aafeef631efcc5f91435e (diff)
downloadffmpeg-890f2e960ac67af102c0a98af1e5c45ff3274ae5.tar.gz
avcodec/libx264: call x264_param_cleanup() if available
The documentation states it should be used to free any memory allocated by x264_param_parse(). Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 479dfe323c..7bbeab7d4c 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -511,6 +511,10 @@ static av_cold int X264_close(AVCodecContext *avctx)
av_freep(&x4->sei);
av_freep(&x4->reordered_opaque);
+#if X264_BUILD >= 161
+ x264_param_cleanup(&x4->params);
+#endif
+
if (x4->enc) {
x264_encoder_close(x4->enc);
x4->enc = NULL;