[FFmpeg-devel] Patch for libx265 memory leak
chen
chenm003 at 163.com
Mon Nov 11 19:09:10 EET 2024
From 4067c58be8e719a55d89e68aaa9d3db19b88b32f Mon Sep 17 00:00:00 2001
From: Chen <chenm003 at 163.com>
Date: Fri, 8 Nov 2024 22:21:19 -0800
Subject: [PATCH] Fix memory leak in the libx265
---
libavcodec/libx265.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 63cc497..60e84d1 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -143,8 +143,10 @@ static av_cold int libx265_encode_close(AVCodecContext *avctx)
rd_release(ctx, i);
av_freep(&ctx->rd);
- if (ctx->encoder)
+ if (ctx->encoder) {
+ ctx->api->cleanup();
ctx->api->encoder_close(ctx->encoder);
+ }
ff_dovi_ctx_unref(&ctx->dovi);
--
2.35.1.windows.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-memory-leak-in-the-libx265.patch
Type: application/octet-stream
Size: 751 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241112/0ad23d8b/attachment.obj>
More information about the ffmpeg-devel
mailing list