summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorcehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-27 22:32:25 +0000
committercehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-27 22:32:25 +0000
commit5a1eca395cc4b6e6b4436c71d4b32405d25a9bbb (patch)
tree131fb889b2469a936515f9472198c2ef790d1de8 /libmpcodecs
parent5f25eaf3d2011cfb92d4553b1421c13d98090906 (diff)
downloadmpv-5a1eca395cc4b6e6b4436c71d4b32405d25a9bbb.tar.bz2
mpv-5a1eca395cc4b6e6b4436c71d4b32405d25a9bbb.tar.xz
Actually use existing uninit() function in remove_logo filter.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30778 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_remove_logo.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/libmpcodecs/vf_remove_logo.c b/libmpcodecs/vf_remove_logo.c
index 69cca75596..72408fbea8 100644
--- a/libmpcodecs/vf_remove_logo.c
+++ b/libmpcodecs/vf_remove_logo.c
@@ -820,6 +820,25 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
}
/**
+ * \brief Frees memory that our filter allocated.
+ *
+ * This is called at exit-time.
+ */
+static void uninit(vf_instance_t *vf)
+{
+ vf_priv_s *ctx = (vf_priv_s *)vf->priv;
+ /* Destroy our masks and images. */
+ destroy_pgm(ctx->filter);
+ destroy_pgm(ctx->half_size_filter);
+ destroy_masks(vf);
+
+ /* Destroy our private structure that had been used to store those masks and images. */
+ free(vf->priv);
+
+ return;
+}
+
+/**
* \brief Initializes our filter.
*
* \param args The arguments passed in from the command line go here. This
@@ -831,6 +850,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
static int vf_open(vf_instance_t *vf, char *args)
{
vf->priv = safe_malloc(sizeof(vf_priv_s));
+ vf->uninit = uninit;
/* Load our filter image. */
if (args)
@@ -873,24 +893,6 @@ static int vf_open(vf_instance_t *vf, char *args)
}
/**
- * \brief Frees memory that our filter allocated.
- *
- * This is called at exit-time.
- */
-static void uninit(vf_instance_t * vf)
-{
- /* Destroy our masks and images. */
- destroy_pgm(((vf_priv_s *)vf->priv)->filter);
- destroy_pgm(((vf_priv_s *)vf->priv)->half_size_filter);
- destroy_masks(vf);
-
- /* Destroy our private structure that had been used to store those masks and images. */
- free(vf->priv);
-
- return;
-}
-
-/**
* \brief Meta data about our filter.
*/
const vf_info_t vf_info_remove_logo = {