[Ffmpeg-devel] [RFC] another attempt at memalign realloc

Michael Niedermayer michaelni
Thu Dec 7 19:33:40 CET 2006


Hi

On Thu, Dec 07, 2006 at 12:34:26PM -0000, M?ns Rullg?rd wrote:
> 
> Reimar D?ffinger said:
> > Hello,
> > On Thu, Dec 07, 2006 at 12:55:47PM +0100, Michael Niedermayer wrote:
> >> > Too bad I can't find any good solution for the
> >> > non-memalign-hack case.
> >>
> >> p= realloc(p, size);
> >> if(!((long)p&15))
> >>     return p;
> >> p2= av_malloc(size);
> >> if(p2)
> >>     memcpy(p2, p, size);
> 
> Won't that overflow either the old or the new buffer?

i dont see how ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali




More information about the ffmpeg-devel mailing list