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

Michael Niedermayer michaelni
Thu Dec 7 12:55:47 CET 2006


Hi

On Thu, Dec 07, 2006 at 11:39:02AM +0100, Reimar D?ffinger wrote:
[...]
> > except these nitpicks iam fine with the patch
> 
> See if it's still fine. 

i trust you to write bugfree code, if not the users can tell us about it :)


> 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);
av_free(p);
return p2;

?

btw, this one with a small modification should work in the memalign-hack
case too i think, would simplify the code though it would be slower in the
memalign-hack case ...

[...]
-- 
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