static void RegionPictureRelease( picture_t *p_pic )
{
free( p_pic->p_data_orig );
+ /* We use pf_release nullity to know if the picture has already been released. */
+ p_pic->pf_release = NULL;
}
subpicture_region_t *__spu_CreateRegion( vlc_object_t *p_this,
video_format_t *p_fmt )
p_subpic_v = p_subpic_v->p_next )
{
if( p_subpic_v->pf_pre_render )
- {
- p_subpic_v->pf_pre_render( p_fmt, p_spu, p_subpic_v, mdate() );
- }
+ p_subpic_v->pf_pre_render( p_fmt, p_spu, p_subpic_v );
}
if( i_scale_width_orig <= 0 )
if( p_subpic->pf_update_regions )
{
- /* FIXME that part look like crap too if there is more than 1 region */
-
- if( p_subpic->p_region )
- spu_DestroyRegion( p_spu, p_subpic->p_region );
-
/* TODO do not reverse the scaling that was done before calling
* spu_RenderSubpictures, just pass it along (or do it inside
* spu_RenderSubpictures) */
fmt_org.i_height =
fmt_org.i_visible_height = i_source_video_height;
- p_subpic->p_region = p_subpic->pf_update_regions( &fmt_org, p_spu, p_subpic, mdate() );
+ p_subpic->pf_update_regions( &fmt_org, p_spu, p_subpic, mdate() );
}
/* */