Commit b709563c authored by Steve Lhomme's avatar Steve Lhomme
Browse files

mosaic: drain potential attached pictures coming out of filters

parent 3b555903
......@@ -586,11 +586,26 @@ static void decoder_queue_video( decoder_t *p_dec, picture_t *p_pic )
if( p_sys->p_vf2 )
p_new_pic = filter_chain_VideoFilter( p_sys->p_vf2, p_new_pic );
/* push the picture in the mosaic-struct structure */
bridged_es_t *p_es = p_sys->p_es;
vlc_global_lock( VLC_MOSAIC_MUTEX );
vlc_picture_chain_Append( &p_es->pictures, p_new_pic );
vlc_global_unlock( VLC_MOSAIC_MUTEX );
if ( p_new_pic != NULL )
{
vlc_global_lock( VLC_MOSAIC_MUTEX );
vlc_picture_chain_Append( &p_es->pictures, p_new_pic );
vlc_global_unlock( VLC_MOSAIC_MUTEX );
}
if( p_sys->p_vf2 )
{
/* push the picture in the mosaic-struct structure */
p_new_pic = filter_chain_VideoFilter( p_sys->p_vf2, NULL );
while ( p_new_pic != NULL )
{
vlc_global_lock( VLC_MOSAIC_MUTEX );
vlc_picture_chain_Append( &p_es->pictures, p_new_pic );
vlc_global_unlock( VLC_MOSAIC_MUTEX );
p_new_pic = filter_chain_VideoFilter( p_sys->p_vf2, NULL );
}
}
}
static int Send( sout_stream_t *p_stream, void *id, block_t *p_buffer )
......
Supports Markdown
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