From 70ccd1c7d1152c74c443971103751225c7f96cd0 Mon Sep 17 00:00:00 2001 From: arpi Date: Thu, 19 Dec 2002 22:33:59 +0000 Subject: [PATCH] fixed memleak caused by multiple config() calls - thx Gabu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8500 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_pp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c index c82ece5798..982b4bbd86 100644 --- a/libmpcodecs/vf_pp.c +++ b/libmpcodecs/vf_pp.c @@ -37,6 +37,7 @@ struct vf_priv_s { static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height, unsigned int voflags, unsigned int outfmt){ + if(vf->priv->context) pp_free_context(vf->priv->context); vf->priv->context= pp_get_context(width, height, (gCpuCaps.hasMMX ? PP_CPU_CAPS_MMX : 0) | (gCpuCaps.hasMMX2 ? PP_CPU_CAPS_MMX2 : 0)