# HG changeset patch # User cboesch # Date 1302760658 0 # Node ID 0ee0e309677b5d83adc583c96ccc7ab423e55280 # Parent 800353f84f4dc3c18cc5e97115ffea356e3e965a 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. diff -r 800353f84f4d -r 0ee0e309677b libmpcodecs/vd_ffmpeg.c --- 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 */