diff mbox series

[FFmpeg-devel,3/3] avcodec/libx264: call x264_param_cleanup() if available

Message ID 20200710210149.6969-3-jamrial@gmail.com
State Accepted
Commit 890f2e960ac67af102c0a98af1e5c45ff3274ae5
Headers show
Series [FFmpeg-devel,1/3] avcodec/libx264: use a function to parse x264opts | expand

Checks

Context Check Description
andriy/default pending
andriy/make fail Make failed

Commit Message

James Almer July 10, 2020, 9:01 p.m. UTC
The documentation states it should be used to free any memory allocated
by x264_param_parse().

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/libx264.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index b39b89b565..0c30bfe895 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;