changeset 30072:e86cf531b110

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.
author reimar
date Sat, 26 Dec 2009 11:11:41 +0000
parents a033bb029e3f
children adc27f8f88c3
files libmpcodecs/vf_palette.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }