lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
***BOGO*** Re: [MPlayer-dev-eng] [PATCH] use av_malloc/av_free instead of malloc where missing memalign
- Date: Mon, 13 Oct 2008 20:49:42 +0200
- From: Gianluigi Tiesi <mplayer@xxxxxxxxxx>
- Subject: ***BOGO*** Re: [MPlayer-dev-eng] [PATCH] use av_malloc/av_free instead of malloc where missing memalign
On Mon, Oct 13, 2008 at 11:03:36PM +0800, JonY wrote:
> On 10/12/2008 07:30, Gianluigi Tiesi wrote:
> > Hi,
> >
> > currently mplayer uses malloc instead of memalign when memalign is not
> > supported.
> >
> > while often align(64) is used for perfomarnce reasons
> >
> > align(16) is needed for sse code
> >
> >
> > The attached patch fixes it in dec_audio.c that avoids
> > crash while decoding an ogg vorbis
> >
> > I've seen a similar patch in liba52 that checks for mingw+sse
> > but I think it's better to check for missing memalign
> >
> > there are also other places to be fixed, but it's a bit
> > dangerous, since free() needs to be mapped to av_free __only__
> > if the buffer is allocated with av_malloc
> > (audio_dec -> a_buffer is ok to av_malloc/av_free,
> > a_in_buffer leads to stack corruptions, free-ed somewhere else?)
> >
> > Regards
> >
> >
>
> Ping.
>
> This thread sounds awfully quiet.
>
> I'd love to have ffaac and ffvorbis working on MinGW, but I couldn't
> test the patch, my usual windows box is down atm. Anybody else tested it?
You'll also need to add -fno-common or attribute aligned will be trashed
by the linker
Regards
--
Gianluigi Tiesi <sherpya@xxxxxxxxxx>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng