Commit 3512e408 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

spu: remove filter_DeleteSubpicture()

This is only used in error corner cases, and is always the same as
calling subpicture_Delete() directly.
parent dfae0979
......@@ -50,7 +50,6 @@ typedef struct filter_owner_t
struct
{
subpicture_t * (*buffer_new)( filter_t * );
void (*buffer_del)( filter_t *, subpicture_t * );
} sub;
};
} filter_owner_t;
......@@ -181,8 +180,8 @@ static inline void filter_FlushPictures( filter_t *p_filter )
/**
* This function will return a new subpicture usable by p_filter as an output
* buffer. You have to release it using filter_DeleteSubpicture or by returning
* it to the caller as a pf_sub_source return value.
* buffer. You have to release it using subpicture_Delete or by returning it to
* the caller as a pf_sub_source return value.
* Provided for convenience.
*
* \param p_filter filter_t object
......@@ -196,19 +195,6 @@ static inline subpicture_t *filter_NewSubpicture( filter_t *p_filter )
return subpic;
}
/**
* This function will release a subpicture create by filter_NewSubicture.
* Provided for convenience.
*
* \param p_filter filter_t object
* \param p_subpicture to be released
*/
static inline void filter_DeleteSubpicture( filter_t *p_filter,
subpicture_t *subpic )
{
p_filter->owner.sub.buffer_del( p_filter, subpic );
}
/**
* This function gives all input attachments at once.
*
......
......@@ -400,7 +400,7 @@ static subpicture_t *FilterSub(filter_t *p_filter, mtime_t date)
p_region = subpicture_region_New(&fmt);
if (!p_region) {
msg_Err(p_filter, "cannot allocate SPU region");
filter_DeleteSubpicture(p_filter, p_spu);
subpicture_Delete(p_spu);
p_spu = NULL;
goto exit;
}
......
......@@ -390,7 +390,7 @@ static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date )
if( !p_region )
{
msg_Err( p_filter, "cannot allocate SPU region" );
filter_DeleteSubpicture( p_filter, p_spu );
subpicture_Delete( p_spu );
p_spu = NULL;
goto exit;
}
......
......@@ -303,7 +303,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
p_spu->p_region = subpicture_region_New( &fmt );
if( !p_spu->p_region )
{
filter_DeleteSubpicture( p_filter, p_spu );
subpicture_Delete( p_spu );
p_spu = NULL;
goto out;
}
......
......@@ -648,7 +648,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
if( !p_region )
{
msg_Err( p_filter, "cannot allocate SPU region" );
filter_DeleteSubpicture( p_filter, p_spu );
subpicture_Delete( p_spu );
vlc_global_unlock( VLC_MOSAIC_MUTEX );
vlc_mutex_unlock( &p_sys->lock );
return p_spu;
......
......@@ -1131,7 +1131,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
if( !p_region )
{
msg_Err( p_filter, "cannot allocate SPU region" );
filter_DeleteSubpicture( p_filter, p_spu );
subpicture_Delete( p_spu );
vlc_mutex_unlock( &p_sys->lock );
return NULL;
}
......
......@@ -414,7 +414,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
p_spu->p_region = subpicture_region_New( &fmt );
if( !p_spu->p_region )
{
filter_DeleteSubpicture( p_filter, p_spu );
subpicture_Delete( p_spu );
vlc_mutex_unlock( &p_sys->lock );
return NULL;
}
......
......@@ -1155,12 +1155,6 @@ static subpicture_t *sub_new_buffer(filter_t *filter)
return subpicture;
}
static void sub_del_buffer(filter_t *filter, subpicture_t *subpic)
{
VLC_UNUSED(filter);
subpicture_Delete(subpic);
}
static int SubSourceInit(filter_t *filter, void *data)
{
spu_t *spu = data;
......@@ -1168,7 +1162,6 @@ static int SubSourceInit(filter_t *filter, void *data)
filter->owner.sys = (void *)(intptr_t)channel;
filter->owner.sub.buffer_new = sub_new_buffer;
filter->owner.sub.buffer_del = sub_del_buffer;
return VLC_SUCCESS;
}
......
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