[FFmpeg-devel] [PATCH] vda: use fast reallocation.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Nov 11 18:43:24 CET 2011


On Fri, Nov 11, 2011 at 06:40:00PM +0100, Sebastien Zwickert wrote:
> 
> On Nov 11, 2011, at 5:55 PM, Reimar Döffinger wrote:
> 
> > On Fri, Nov 11, 2011 at 04:21:37PM +0100, Sebastien Zwickert wrote:
> >> Hi,
> >> 
> >> The patch in attachment reuses the buffer in order to take benefits of av_fast_realloc().
> > 
> > Why av_fast_realloc and not av_fast_malloc? I can't see the need to
> > preserve previous contents.
> 
> reusing buffer isn't faster ?

Both reuse buffers.
However by using av_fast_realloc instead of av_fast_malloc you have to
do more effort to handle allocation failures and you force it to copy
the old contents over to the new buffer if the buffer can't be reused.


More information about the ffmpeg-devel mailing list