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

Måns Rullgård mru
Thu Dec 7 20:14:35 CET 2006


Michael Niedermayer <michaelni at gmx.at> writes:

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

Forget it.  I wasn't thinking properly.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list