Commit c0e252ed authored by Thomas Guillem's avatar Thomas Guillem

video_filter: wave: add missing sys allocation

And use vlc_obj_malloc to get ride of the destroy callback.

Regression from 4c8b741e
parent 28f8d621
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
static int Create ( vlc_object_t * ); static int Create ( vlc_object_t * );
static void Destroy ( vlc_object_t * );
static picture_t *Filter( filter_t *, picture_t * ); static picture_t *Filter( filter_t *, picture_t * );
...@@ -57,7 +56,7 @@ vlc_module_begin () ...@@ -57,7 +56,7 @@ vlc_module_begin ()
set_subcategory( SUBCAT_VIDEO_VFILTER ) set_subcategory( SUBCAT_VIDEO_VFILTER )
add_shortcut( "wave" ) add_shortcut( "wave" )
set_callbacks( Create, Destroy ) set_callbacks( Create, NULL )
vlc_module_end () vlc_module_end ()
/***************************************************************************** /*****************************************************************************
...@@ -87,7 +86,10 @@ static int Create( vlc_object_t *p_this ) ...@@ -87,7 +86,10 @@ static int Create( vlc_object_t *p_this )
return VLC_EGENERIC; return VLC_EGENERIC;
/* Allocate structure */ /* Allocate structure */
filter_sys_t *p_sys = p_filter->p_sys; filter_sys_t *p_sys = p_filter->p_sys =
vlc_obj_malloc( p_this, sizeof(*p_sys) );
if( !p_sys )
return VLC_ENOMEM;
p_filter->pf_video_filter = Filter; p_filter->pf_video_filter = Filter;
...@@ -97,17 +99,6 @@ static int Create( vlc_object_t *p_this ) ...@@ -97,17 +99,6 @@ static int Create( vlc_object_t *p_this )
return VLC_SUCCESS; return VLC_SUCCESS;
} }
/*****************************************************************************
* Destroy: destroy Distort video thread output method
*****************************************************************************
* Terminate an output method created by DistortCreateOutputMethod
*****************************************************************************/
static void Destroy( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
free( p_filter->p_sys );
}
/***************************************************************************** /*****************************************************************************
* Render: displays previously rendered output * Render: displays previously rendered output
***************************************************************************** *****************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment