Commit acf420db authored by Laurent Aimar's avatar Laurent Aimar

Improved vout picture locking scheme.

parent 7e8ca640
...@@ -931,10 +931,9 @@ static void* RunThread( vlc_object_t *p_this ) ...@@ -931,10 +931,9 @@ static void* RunThread( vlc_object_t *p_this )
picture_t *p_directbuffer; picture_t *p_directbuffer;
int i_index; int i_index;
/* /* Find the picture to display (the one with the earliest date). */
* Find the picture to display (the one with the earliest date). vlc_mutex_lock( &p_vout->picture_lock );
* This operation does not need lock, since only READY_PICTUREs
* are handled. */
for( i_index = 0; i_index < I_RENDERPICTURES; i_index++ ) for( i_index = 0; i_index < I_RENDERPICTURES; i_index++ )
{ {
picture_t *p_pic = PP_RENDERPICTURE[i_index]; picture_t *p_pic = PP_RENDERPICTURE[i_index];
...@@ -1014,6 +1013,7 @@ static void* RunThread( vlc_object_t *p_this ) ...@@ -1014,6 +1013,7 @@ static void* RunThread( vlc_object_t *p_this )
p_vout->p->i_picture_lost++; p_vout->p->i_picture_lost++;
msg_Warn( p_vout, "late picture skipped (%"PRId64")", msg_Warn( p_vout, "late picture skipped (%"PRId64")",
current_date - display_date ); current_date - display_date );
vlc_mutex_unlock( &p_vout->picture_lock );
continue; continue;
} }
...@@ -1043,6 +1043,7 @@ static void* RunThread( vlc_object_t *p_this ) ...@@ -1043,6 +1043,7 @@ static void* RunThread( vlc_object_t *p_this )
} }
} }
} }
vlc_mutex_unlock( &p_vout->picture_lock );
if( p_picture == NULL ) if( p_picture == NULL )
i_idle_loops++; i_idle_loops++;
......
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