[FFmpeg-devel] [PATCH] id3v2 unsynchronisation support

Michael Niedermayer michaelni
Wed Aug 11 17:15:06 CEST 2010


On Wed, Aug 11, 2010 at 11:14:08AM +1000, Alexander Kojevnikov wrote:
> 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.

>  id3v2.c |   50 ++++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 36 insertions(+), 14 deletions(-)
> ae1c35f810f098c2a5688289d8631e7a66610212  0001-id3v2-unsynchronisation-support.patch
> From 7fe8a5fbca69ae1c42b23c0fe72e7d58cfd6c322 Mon Sep 17 00:00:00 2001
> From: Alexander Kojevnikov <alexander at kojevnikov.com>
> Date: Wed, 11 Aug 2010 11:11:38 +1000
> Subject: [PATCH] id3v2: unsynchronisation support

looks ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100811/d9c8d98d/attachment.pgp>



More information about the ffmpeg-devel mailing list