Commit 02ef6280 authored by Christophe Massiot's avatar Christophe Massiot

* modules/stream_out/bridge.c: Fixed deleting/adding of streams.

 * modules/stream_out/mosaic_bridge.c: Fixed potential segfault.
 * modules/video_filter/mosaic.c: Run the mosaic thread in a higher priority.
parent e33a897b
......@@ -432,6 +432,8 @@ static int SendIn( sout_stream_t *p_stream, sout_stream_id_t *id,
< p_bridge->pp_es[i]->i_last) )
{
block_t *p_block = p_bridge->pp_es[i]->p_block;
msg_Dbg( p_stream, "dropping a packet (" I64Fd ")",
p_bridge->pp_es[i]->i_last - p_block->i_dts );
p_bridge->pp_es[i]->p_block
= p_bridge->pp_es[i]->p_block->p_next;
block_Release( p_block );
......@@ -489,10 +491,9 @@ static int SendIn( sout_stream_t *p_stream, sout_stream_id_t *id,
if ( p_bridge->pp_es[i]->id != NULL )
{
block_t *p_block = p_bridge->pp_es[i]->p_block;
p_bridge->pp_es[i]->i_last = p_bridge->pp_es[i]->p_block->i_dts
+ p_bridge->pp_es[i]->p_block->i_length;
while ( p_block != NULL )
{
p_bridge->pp_es[i]->i_last = p_block->i_dts;
p_block->i_pts += p_sys->i_delay;
p_block->i_dts += p_sys->i_delay;
p_block = p_block->p_next;
......
......@@ -408,7 +408,6 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
vout_CopyPicture( p_stream, p_new_pic, p_pic );
}
p_pic->pf_release( p_pic );
p_new_pic->i_refcount = 1;
p_new_pic->i_status = DESTROYED_PICTURE;
......@@ -417,6 +416,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
p_new_pic->pf_release = ReleasePicture;
p_new_pic->date = p_pic->date;
p_pic->pf_release( p_pic );
PushPicture( p_stream, p_new_pic );
}
......
......@@ -164,6 +164,9 @@ static int CreateFilter( vlc_object_t *p_this )
int i_index;
vlc_value_t val;
/* The mosaic thread is more important than the decoder threads */
vlc_thread_set_priority( p_this, VLC_THREAD_PRIORITY_OUTPUT );
/* Allocate structure */
p_sys = p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
if( p_sys == NULL )
......
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