[FFmpeg-devel] [PATCH] id3v2 unsynchronisation support

Reimar Döffinger Reimar.Doeffinger
Tue Aug 10 15:55:01 CEST 2010


On Tue, Aug 10, 2010 at 09:45:53PM +1000, Alexander Kojevnikov wrote:
> > why the if() ?
> 
> You mean the last `if`? Because we don't know how realloc is
> implemented on each platform, it can potentially be slow, even if the
> new size is less than the new one. I think it makes sense to reduce
> the number of library calls anyway, and it's not hard in this
> particular case.

If performance matters, use the av_realloc variants that take a size
argument and avoid extra work.
If performance does not matter, use the simplest way.
Your solution uses the "middle" way that solves neither problem
and thus seems rather senseless.



More information about the ffmpeg-devel mailing list