[MPlayer-cvslog] r33255 - trunk/libmpcodecs/vd_ffmpeg.c

cboesch subversion at mplayerhq.hu
Thu Apr 14 07:57:38 CEST 2011


Author: cboesch
Date: Thu Apr 14 07:57:38 2011
New Revision: 33255

Log:
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.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Wed Apr 13 09:38:41 2011	(r33254)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Thu Apr 14 07:57:38 2011	(r33255)
@@ -422,7 +422,7 @@ static int init(sh_video_t *sh){
     }
     /* 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 */


More information about the MPlayer-cvslog mailing list