[MPlayer-dev-eng] [PATCH] use av_malloc/av_free instead of malloc where missing memalign

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Oct 16 21:41:51 CEST 2008


On Wed, Oct 15, 2008 at 06:12:07PM +0200, Reimar Döffinger wrote:
> > 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?)
> 
> a_in_buffer is only hacked in such an inappropriate way in ad_twin.
> If it still crashes we'll have to check in more detail, a_in_buffer
> probably should be padded anyway.
> Please provide as detailed a bugreport as you can.
> And I'd suggest attached (untested) patch.

Works just fine for me, not problems with a_in_buffer (though I did not
test ad_twin).
If there are no objections I intend to apply in a few days,
also replacing the malloc in ad_twin by av_malloc (though that code is
horribly broken anyways).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list