if( p_sys->p_image )
image_HandlerDelete( p_sys->p_image );
if( p_sys->p_overlay )
- p_sys->p_overlay->pf_release( p_sys->p_overlay );
+ picture_Release( p_sys->p_overlay );
free( p_sys->p_style );
free( p_sys );
if( p_intf->p_sys->p_blend ) return VLC_EGENERIC;
p_intf->p_sys->p_blend =
- vlc_object_create( p_intf, VLC_OBJECT_FILTER );
+ vlc_object_create( p_intf, sizeof(filter_t) );
vlc_object_attach( p_intf->p_sys->p_blend, p_intf );
p_intf->p_sys->p_blend->fmt_out.video.i_x_offset =
p_intf->p_sys->p_blend->fmt_out.video.i_y_offset = 0;
if( p_intf->p_sys->p_text ) return VLC_EGENERIC;
p_intf->p_sys->p_text =
- vlc_object_create( p_intf, VLC_OBJECT_FILTER );
+ vlc_object_create( p_intf, sizeof(filter_t) );
vlc_object_attach( p_intf->p_sys->p_text, p_intf );
p_intf->p_sys->p_text->fmt_out.video.i_width =
static picture_t *AllocatePicture( vlc_object_t *p_this,
video_format_t *p_fmt )
{
- picture_t *p_pic = malloc( sizeof( picture_t ) );
- if( !p_pic ) return NULL;
+ picture_t *p_picture = picture_New( p_fmt->i_chroma,
+ p_fmt->i_width, p_fmt->i_height,
+ p_fmt->i_aspect );
+ if( !p_picture )
+ return NULL;
if( !p_fmt->p_palette &&
( p_fmt->i_chroma == VLC_FOURCC('Y','U','V','P') ) )
p_fmt->p_palette = malloc( sizeof(video_palette_t) );
if( !p_fmt->p_palette )
{
- free( p_pic );
+ picture_Release( p_picture );
return NULL;
}
}
- else p_fmt->p_palette = NULL;
-
- p_pic->p_data_orig = NULL;
-
- vout_AllocatePicture( p_this, p_pic, p_fmt->i_chroma,
- p_fmt->i_width, p_fmt->i_height, p_fmt->i_aspect );
-
- if( !p_pic->i_planes )
+ else
{
- free( p_pic );
- free( p_fmt->p_palette );
- return NULL;
+ p_fmt->p_palette = NULL;
}
- return p_pic;
+
+ return p_picture;
}
/*****************************************************************************
video_format_t *p_fmt )
{
VLC_UNUSED(p_this);
- if( p_pic )
- {
- free( p_pic->p_data_orig );
- if( p_pic->pf_release ) p_pic->pf_release( p_pic );
- else free( p_pic );
- }
+
if( p_fmt )
{
free( p_fmt->p_palette );
p_fmt->p_palette = NULL;
}
- p_pic = NULL;
+
+ if( p_pic )
+ picture_Release( p_pic );
}
/*****************************************************************************
{
RenderPicture( p_intf, render->i_x, render->i_y,
p_pic, p_sys->p_overlay );
- p_pic->pf_release( p_pic );
+ picture_Release( p_pic );
}
}
else if( render->i_type == FBOSD_RENDER_TEXT )
{
RenderPicture( p_intf, render->i_x, render->i_y,
p_text, p_sys->p_overlay );
- p_text->pf_release( p_text );
+ picture_Release( p_text );
}
#endif
}