From 929a159f6941207d18dfeb73c2adb95edc5b54c3 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 26 Dec 2009 11:11:41 +0000 Subject: 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30114 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_palette.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmpcodecs/vf_palette.c b/libmpcodecs/vf_palette.c index 7e7cb1c7c0..7ce250c186 100644 --- a/libmpcodecs/vf_palette.c +++ b/libmpcodecs/vf_palette.c @@ -76,6 +76,7 @@ static int config(struct vf_instance_s* vf, 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 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ } } } + mpi->planes[1] = old_palette; return vf_next_put_image(vf,dmpi, pts); } -- cgit v1.2.3