Commit 8ccff3d7 authored by Christophe Massiot's avatar Christophe Massiot

The YUV buffer is now freed after displaying (useful for overlay).

parent aa7cf7ba
......@@ -1067,19 +1067,6 @@ static void RunThread( vout_thread_t *p_vout)
}
}
/* Remove picture from heap */
vlc_mutex_lock( &p_vout->picture_lock );
if( p_pic->i_refcount )
{
p_pic->i_status = DISPLAYED_PICTURE;
}
else
{
p_pic->i_status = DESTROYED_PICTURE;
p_vout->i_pictures--;
}
vlc_mutex_unlock( &p_vout->picture_lock );
/* Render interface and subpicture */
if( b_display && p_vout->b_interface )
{
......@@ -1177,6 +1164,23 @@ static void RunThread( vout_thread_t *p_vout)
#endif
}
if( p_pic )
{
/* Remove picture from heap */
vlc_mutex_lock( &p_vout->picture_lock );
if( p_pic->i_refcount )
{
p_pic->i_status = DISPLAYED_PICTURE;
}
else
{
p_pic->i_status = DESTROYED_PICTURE;
p_vout->i_pictures--;
}
vlc_mutex_unlock( &p_vout->picture_lock );
}
/*
* Check events and manage thread
*/
......
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