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

Diego Biurrun diego
Wed Jan 7 23:46:16 CET 2009


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?

Diego




More information about the ffmpeg-devel mailing list