[FFmpeg-devel] [PATCH] id3v2 unsynchronisation support

Alexander Kojevnikov alexander
Wed Aug 11 03:14:08 CEST 2010


On 10 August 2010 23:55, Reimar D?ffinger <Reimar.Doeffinger at gmx.de> wrote:
> 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.

I wasn't aware of av_fast_realloc, thanks for the tip!

The patch is updated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-id3v2-unsynchronisation-support.patch
Type: text/x-patch
Size: 5154 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100811/7bd16c7e/attachment.bin>



More information about the ffmpeg-devel mailing list