[FFmpeg-devel] [PATCH] avformat/movenc: Reduce size of the allocated MOVIentry array

Anton Khirnov anton at khirnov.net
Thu Mar 26 16:06:58 EET 2020


Quoting James Almer (2020-03-25 18:56:44)
> Increase it in a linear way instead.
> Helps reduce memory usage, especially on long, non fragmented output.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> An alternative is using av_fast_realloc(), in a similar fashion as
> ff_add_index_entry(), which will keep the memory usage more closely tied to the
> amount of entries needed, but the amount of reallocations will be much higher,
> so i don't know if the tradeof is beneficial.

Wait, wouldn't fast_realloc() do pretty much the same as your patch? Why
should the number of reallocations be higher?

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list