# HG changeset patch # User reimar # Date 1261825901 0 # Node ID e86cf531b1107c56265d96626f9686a5ee099d7e # Parent a033bb029e3f6be9ea54b1a3f48e58a363475b16 Restore the old value of planes[1] in vf_palette at the end to ensure we do not call free() on the fixed gray_pal array. diff -r a033bb029e3f -r e86cf531b110 libmpcodecs/vf_palette.c --- a/libmpcodecs/vf_palette.c Sat Dec 26 02:35:36 2009 +0000 +++ b/libmpcodecs/vf_palette.c Sat Dec 26 11:11:41 2009 +0000 @@ -76,6 +76,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; + uint8_t *old_palette = mpi->planes[1]; // hope we'll get DR buffer: dmpi=vf_get_image(vf->next,vf->priv->fmt, @@ -152,6 +153,7 @@ } } } + mpi->planes[1] = old_palette; return vf_next_put_image(vf,dmpi, pts); }