[FFmpeg-devel] [PATCH] avutil/buffer: free all pooled buffers immediately after uninitializing the pool

Anton Khirnov anton at khirnov.net
Wed Feb 24 10:23:42 EET 2021


Quoting James Almer (2021-02-20 14:21:47)
> No buffer will be fetched from the pool after it's uninitialized, so there's
> no benefit from waiting until every single buffer has been returned to it
> before freeing them all.
> This should free some memory in certain scenarios, which can be beneficial in
> low memory systems.
> 
> Based on a patch by Jonas Karlman.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavutil/buffer.c | 19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)

Looks ok.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list