# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_sout.h>
#include <vlc_vout.h>
#include "vlc_image.h"
#include "vlc_filter.h"
+#include "filter_picture.h"
/*****************************************************************************
* Local prototypes
if( p_filter->p_sys->p_mask )
{
if( p_old_mask )
- p_old_mask->pf_release( p_old_mask );
+ picture_Release( p_old_mask );
}
else if( p_old_mask )
{
/* Allocate structure */
p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
if( p_filter->p_sys == NULL )
- {
- msg_Err( p_filter, "out of memory" );
return VLC_ENOMEM;
- }
p_sys = p_filter->p_sys;
p_filter->pf_video_filter = Filter;
filter_t *p_filter = (filter_t *)p_this;
filter_sys_t *p_sys = p_filter->p_sys;
if( p_sys->p_mask )
- p_sys->p_mask->pf_release( p_sys->p_mask );
+ picture_Release( p_sys->p_mask );
vlc_mutex_destroy( &p_sys->lock );
if( !p_outpic )
{
msg_Warn( p_filter, "can't get output picture" );
- if( p_pic->pf_release )
- p_pic->pf_release( p_pic );
+ picture_Release( p_pic );
return NULL;
}
/* Here */
FilterErase( p_filter, p_pic, p_outpic );
- p_outpic->date = p_pic->date;
- p_outpic->b_force = p_pic->b_force;
- p_outpic->i_nb_fields = p_pic->i_nb_fields;
- p_outpic->b_progressive = p_pic->b_progressive;
- p_outpic->b_top_field_first = p_pic->b_top_field_first;
-
- if( p_pic->pf_release )
- p_pic->pf_release( p_pic );
-
- return p_outpic;
+ return CopyInfoAndRelease( p_outpic, p_pic );
}
/*****************************************************************************