PR #22437 opened by James Almer (jamrial) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22437 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22437.patch
There are some buffers still allocated even with it. Fixes memleaks. >From fc5e327b9a78c6d9bb59f6731199cc5f6de23c42 Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Sat, 7 Mar 2026 10:49:19 -0300 Subject: [PATCH] swscale/utils: don't abort early in sws_freeContext() for non legacy API There are some buffers still allocated even with it. Fixes memleaks. Signed-off-by: James Almer <[email protected]> --- libswscale/utils.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 89fe6c8a1c..2b233cf0e6 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -2272,11 +2272,6 @@ void sws_freeContext(SwsContext *sws) for (i = 0; i < FF_ARRAY_ELEMS(c->graph); i++) ff_sws_graph_free(&c->graph[i]); - if (!c->is_legacy_init) { - av_free(c); - return; - } - for (i = 0; i < c->nb_slice_ctx; i++) sws_freeContext(c->slice_ctx[i]); av_freep(&c->slice_ctx); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
