[Ffmpeg-devel] [PATCH] plain malloc in output_example.c

Michael Niedermayer michaelni
Sun Aug 20 19:22:27 CEST 2006


On Sun, Aug 20, 2006 at 05:25:37PM +0200, Luca Barbato wrote:
> Michael Niedermayer wrote:
> > Hi
> > 
> > On Sun, Aug 20, 2006 at 12:00:14AM -0300, Ramiro Polla wrote:
> >> Hello,
> >>
> >> Shouldn't output_example.c use av_malloc() instead of plain malloc()? It
> >> uses av_free(), so when --enable-memalign-hack is enabled, it allocates
> >> an unaligned buffer, and tries to free it with the memalign hack.
> >>
> >> Attached patch makes it work with --enable-memalign-hack.
> > 
> > instead of changing several malloc() change one av_free()
> malloc could be wrong... I haven't checked yet how much.
> Think of the SIMD code...

i dont remember any bugreports about that and malloc() probably was
used there since output_example was written

furthermore using av_malloc() in an example gives the impression that
stuff feeded into lav* must be allocated with that which is false


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is

More information about the ffmpeg-devel mailing list