[MPlayer-dev-eng] [PATCH]Use uninit in remove_logo filter

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Feb 27 22:43:00 CET 2010


On Sat, Feb 27, 2010 at 10:23:36PM +0100, Carl Eugen Hoyos wrote:
> Please comment, untested.
> 
> Carl Eugen

> Index: libmpcodecs/vf_remove_logo.c
> ===================================================================
> --- libmpcodecs/vf_remove_logo.c	(revision 30764)
> +++ libmpcodecs/vf_remove_logo.c	(working copy)
> @@ -820,6 +820,24 @@
>  }
>  
>  /**
> + * \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);

While you're at it I'd find it nicer if you added a
local variable for vf->priv instead of the casts.
I guess it's good otherwise.



More information about the MPlayer-dev-eng mailing list