summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-26 11:11:41 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-26 11:11:41 +0000
commit929a159f6941207d18dfeb73c2adb95edc5b54c3 (patch)
tree7cc99cd1fac6d0625d96b69b28288628cdfeba8c
parent48b88b30e037f9d4292a9d0d44559e0622c42504 (diff)
downloadmpv-929a159f6941207d18dfeb73c2adb95edc5b54c3.tar.bz2
mpv-929a159f6941207d18dfeb73c2adb95edc5b54c3.tar.xz
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
-rw-r--r--libmpcodecs/vf_palette.c2
1 files changed, 2 insertions, 0 deletions
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);
}