Commit aa7c7e37 authored by Laurent Aimar's avatar Laurent Aimar

Added vout_Flush .

parent 7ee4309d
......@@ -610,7 +610,24 @@ void vout_GetResetStatistic( vout_thread_t *p_vout, int *pi_displayed, int *pi_l
vlc_object_unlock( p_vout );
}
void vout_Flush( vout_thread_t *p_vout, mtime_t i_date )
{
vlc_mutex_lock( &p_vout->picture_lock );
for( int i = 0; i < p_vout->render.i_pictures; i++ )
{
picture_t *p_pic = p_vout->render.pp_picture[i];
if( p_pic->i_status == READY_PICTURE ||
p_pic->i_status == DISPLAYED_PICTURE )
{
/* We cannot change picture status if it is in READY_PICTURE state,
* Just make sure they won't be displayed */
if( p_pic->date > i_date )
p_pic->date = i_date;
}
}
vlc_mutex_unlock( &p_vout->picture_lock );
}
/*****************************************************************************
* InitThread: initialize video output thread
*****************************************************************************
......
......@@ -105,5 +105,11 @@ void spu_OffsetSubtitleDate( spu_t *p_spu, mtime_t i_duration );
*/
void vout_GetResetStatistic( vout_thread_t *p_vout, int *pi_displayed, int *pi_lost );
/**
* This function will ensure that all ready/displayed pciture have at most
* the provided dat
*/
void vout_Flush( vout_thread_t *p_vout, mtime_t i_date );
#endif
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