[FFmpeg-devel] [PATCH] Use posix_memalign() instead of memalign()

Måns Rullgård mans
Thu Jan 8 00:22:36 CET 2009


Diego Biurrun <diego at biurrun.de> writes:

> On Wed, Jan 07, 2009 at 02:35:20AM -0200, Ramiro Polla wrote:
>> 
>> New patch attached.
>> 
>> --- libavutil/mem.c	(revision 16462)
>> +++ libavutil/mem.c	(working copy)
>> @@ -57,6 +58,8 @@
>>      diff= ((-(long)ptr - 1)&15) + 1;
>>      ptr = (char*)ptr + diff;
>>      ((char*)ptr)[-1]= diff;
>> +#elif defined (HAVE_POSIX_MEMALIGN)
>> +    posix_memalign(&ptr,16,size);
>>  #elif defined (HAVE_MEMALIGN)
>>      ptr = memalign(16,size);
>>      /* Why 64?
>
> Is the HAVE_MEMALIGN case still needed?

Nothing has changed with respect to the availability of memalign().

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list