mirror of https://github.com/mpv-player/mpv
Actually use existing uninit() function in remove_logo filter.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30778 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5f25eaf3d2
commit
5a1eca395c
|
@ -819,6 +819,25 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* \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.
|
||||
*
|
||||
|
@ -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)
|
||||
|
@ -872,24 +892,6 @@ static int vf_open(vf_instance_t *vf, char *args)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* \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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue