Commit 1c7d467f authored by Laurent Aimar's avatar Laurent Aimar

Fixed snapshot while video is paused.

parent 4ec42b9f
...@@ -1108,11 +1108,9 @@ static void* RunThread( vlc_object_t *p_this ) ...@@ -1108,11 +1108,9 @@ static void* RunThread( vlc_object_t *p_this )
p_filtered_picture = filter_chain_VideoFilter( p_vout->p->p_vf2_chain, p_filtered_picture = filter_chain_VideoFilter( p_vout->p->p_vf2_chain,
p_picture ); p_picture );
/* FIXME it is a bit ugly that b_snapshot is not locked but I do not /* FIXME it is ugly that b_snapshot is not locked but I do not
* know which lock to use (here and in the snapshot callback) */ * know which lock to use (here and in the snapshot callback) */
const bool b_snapshot = p_vout->p->b_snapshot; const bool b_snapshot = p_vout->p->b_snapshot && p_picture != NULL;
if( b_snapshot )
p_vout->p->b_snapshot = false;
/* /*
* Check for subpictures to display * Check for subpictures to display
...@@ -1133,7 +1131,12 @@ static void* RunThread( vlc_object_t *p_this ) ...@@ -1133,7 +1131,12 @@ static void* RunThread( vlc_object_t *p_this )
* Take a snapshot if requested * Take a snapshot if requested
*/ */
if( p_directbuffer && b_snapshot ) if( p_directbuffer && b_snapshot )
{
/* FIXME lock (see b_snapshot) */
p_vout->p->b_snapshot = false;
vout_Snapshot( p_vout, p_directbuffer ); vout_Snapshot( p_vout, p_directbuffer );
}
/* /*
* Call the plugin-specific rendering method if there is one * Call the plugin-specific rendering method if there is one
......
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