[MPlayer-dev-eng] [PATCH] memalign hack should use av_malloc

Hervé W. H.O.W.aka.V+mplayer at gmail.com
Sun Jul 23 02:43:56 CEST 2006


On 23/07/06, Gianluigi Tiesi <mplayer at netfarm.it> wrote:
> When compiling mplayer in systems without memalign,
> configure aliases it malloc, but libswscale/swscale.c
> grabs malloc definition from libavutil converting it
> in please_use_av_malloc,
> this patch make use of av_malloc when memalign is missing,
> this is not a big deal since if I understood ffmpeg stuff
> is now mandatory.
>
> patch @ http://oss.netfarm.it/mplayer/patches/xx_memalign_av_malloc.diff

If memalign gets defined as av_malloc, doesn't free have to become
av_free (or av_freep) ? I think I saw some lines in liba52/parse.c and
in libswscale/swscale.c where "memaligned" memory gets free'd and I
think there are more locations.
And if free becomes av_free, all the rest of the real malloc, calloc
and realloc call should become av_*alloc. It has the added benifit
that enabling SSE in MinGW builds shouldn't cause any problems
anymore.

-V



More information about the MPlayer-dev-eng mailing list