Commit bb03e12e authored by Antoine Cellerier's avatar Antoine Cellerier

Partially fix sub picture filter chain handling. Still needs a bit of

work.
parent a7588a7e
......@@ -95,10 +95,16 @@ void filter_chain_Reset( filter_chain_t *p_chain, const es_format_t *p_fmt_in,
while( p_chain->filters.i_count )
filter_chain_DeleteFilter( p_chain,
(filter_t*)p_chain->filters.pp_elems[0] );
if( p_fmt_in )
{
es_format_Clean( &p_chain->fmt_in );
es_format_Clean( &p_chain->fmt_out );
es_format_Copy( &p_chain->fmt_in, p_fmt_in );
}
if( p_fmt_out )
{
es_format_Clean( &p_chain->fmt_out );
es_format_Copy( &p_chain->fmt_out, p_fmt_out );
}
}
......
......@@ -54,7 +54,6 @@ static picture_t *spu_new_video_buffer( filter_t * );
static void spu_del_video_buffer( filter_t *, picture_t * );
static int spu_ParseChain( spu_t * );
static void spu_DeleteChain( spu_t * );
static int SubFilterCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
......@@ -189,17 +188,12 @@ void spu_Destroy( spu_t *p_spu )
vlc_object_release( p_spu->p_scale );
}
spu_DeleteChain( p_spu );
filter_chain_Delete( p_spu->p_chain );
vlc_mutex_destroy( &p_spu->subpicture_lock );
vlc_object_release( p_spu );
}
static void spu_DeleteChain( spu_t *p_spu )
{
filter_chain_Delete( p_spu->p_chain );
}
/**
* Attach/Detach the SPU from any input
*
......@@ -1345,7 +1339,7 @@ static int SubFilterCallback( vlc_object_t *p_object, char const *psz_var,
spu_t *p_spu = (spu_t *)p_data;
vlc_mutex_lock( &p_spu->subpicture_lock );
spu_DeleteChain( p_spu );
filter_chain_Reset( p_spu->p_chain, NULL, NULL );
spu_ParseChain( p_spu );
vlc_mutex_unlock( &p_spu->subpicture_lock );
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