[FFmpeg-devel] [PATCH][RFC]lavu/mem: Do not realloc in av_fast_alloc() if size == min_size
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sat Dec 30 15:44:54 EET 2017
Hi!
FFmpeg has an arbitrary allocation limit (2G iirc), av_fast_realloc()
increases the allocation even if the requested is equal the already
allocated size. I believe this can lead to unnecessary OOM (no
testcase) if the requested (and already allocated) size is close to
our limit.
Additionally, this avoids an over-allocation for the mov stts patch I just sent.
Attached patch changes the behaviour introduced 15 years ago.
Please comment, Carl Eugen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavu-mem-Do-not-realloc-in-av_fast_realloc-if-size-m.patch
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171230/5ff598bc/attachment.bin>
More information about the ffmpeg-devel
mailing list