[MPlayer-dev-eng] [patch] Consistent av_malloc/av_free in libmpcodecs/vd_ffmpeg.c

Clément Bœsch ubitux at gmail.com
Wed Apr 13 21:10:34 CEST 2011


On Mon, Apr 11, 2011 at 05:15:38PM +0200, Lucius Windschuh wrote:
> Dear list members,
> the current mplayer code mixes calloc() with av_free() in
> libmpcodecs/vd_ffmpeg.c, resulting in assertion failures on FreeBSD
> i386 with malloc debugging enabled since av_malloc modifies the
> returned pointers to give alignment guarantees.
> So, the wrong pointer is given to free(), making it bark.
> The patch below fixes the issue by consistently using av_mallocz()
> with av_free().
> 
> Index: libmpcodecs/vd_ffmpeg.c
> ===================================================================
> --- libmpcodecs/vd_ffmpeg.c     (Revision 33081)
> +++ libmpcodecs/vd_ffmpeg.c     (Arbeitskopie)

Looks ok to me. There is another malloc in the same file, but it is
free'ed with free() so doesn't really matter. I'll apply it soon, thank
you.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110413/29dad69d/attachment.pgp>


More information about the MPlayer-dev-eng mailing list