Mercurial > mplayer.hg
changeset 33168:0ee0e309677b
Fix wrong allocation.
Pointer is being freed with av_freep, so make the code consistent by using
av_mallocz. This fix assertion failures with systems having the align memory
hack in FFmpeg.
Patch by Lucius Windschuh, lwindschuh googlemail com.
author | cboesch |
---|---|
date | Thu, 14 Apr 2011 05:57:38 +0000 |
parents | 800353f84f4d |
children | 5c0199da7d2d |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Wed Apr 13 07:38:41 2011 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Thu Apr 14 05:57:38 2011 +0000 @@ -422,7 +422,7 @@ } /* Pass palette to codec */ if (sh->bih && (sh->bih->biBitCount <= 8)) { - avctx->palctrl = calloc(1, sizeof(AVPaletteControl)); + avctx->palctrl = av_mallocz(sizeof(AVPaletteControl)); avctx->palctrl->palette_changed = 1; if (sh->bih->biSize-sizeof(*sh->bih)) /* Palette size in biSize */