-static void VoutDisplayedPicture( vout_thread_t *p_vout, picture_t *p_pic )
-{
- vlc_mutex_lock( &p_vout->picture_lock );
-
- if( p_pic->i_status == READY_PICTURE )
- {
- /* Grr cannot destroy ready picture by myself so be sure vout won't like it */
- p_pic->date = 1;
- }
- else if( p_pic->i_refcount > 0 )
- {
- p_pic->i_status = DISPLAYED_PICTURE;
- }
- else
- {
- p_pic->i_status = DESTROYED_PICTURE;
- picture_CleanupQuant( p_pic );
- p_vout->i_heap_size--;
- }
-
- vlc_mutex_unlock( &p_vout->picture_lock );
-}
-static void VoutFlushPicture( vout_thread_t *p_vout, mtime_t i_max_date )
-{
- int i;
- vlc_mutex_lock( &p_vout->picture_lock );
- for( 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_max_date )
- p_pic->date = i_max_date;
- }
- }
- vlc_mutex_unlock( &p_vout->picture_lock );
-}