picture_t *p_directbuffer;
int i_index;
- /*
- * Find the picture to display (the one with the earliest date).
- * This operation does not need lock, since only READY_PICTUREs
- * are handled. */
+ /* Find the picture to display (the one with the earliest date). */
+ vlc_mutex_lock( &p_vout->picture_lock );
+
for( i_index = 0; i_index < I_RENDERPICTURES; i_index++ )
{
picture_t *p_pic = PP_RENDERPICTURE[i_index];
p_vout->p->i_picture_lost++;
msg_Warn( p_vout, "late picture skipped (%"PRId64")",
current_date - display_date );
+ vlc_mutex_unlock( &p_vout->picture_lock );
continue;
}
}
}
}
+ vlc_mutex_unlock( &p_vout->picture_lock );
if( p_picture == NULL )
i_idle_loops++;