[vlc-devel] commit: Fixed snapshot while video is paused. (Laurent Aimar )
git version control
git at videolan.org
Sat Nov 15 23:04:16 CET 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Nov 15 22:53:26 2008 +0100| [1c7d467fd350ca8b2f24b8e053acfc94f5db8def] | committer: Laurent Aimar
Fixed snapshot while video is paused.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c7d467fd350ca8b2f24b8e053acfc94f5db8def
---
src/video_output/video_output.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 8c58747..133585d 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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_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) */
- const bool b_snapshot = p_vout->p->b_snapshot;
- if( b_snapshot )
- p_vout->p->b_snapshot = false;
+ const bool b_snapshot = p_vout->p->b_snapshot && p_picture != NULL;
/*
* Check for subpictures to display
@@ -1133,7 +1131,12 @@ static void* RunThread( vlc_object_t *p_this )
* Take a snapshot if requested
*/
if( p_directbuffer && b_snapshot )
+ {
+ /* FIXME lock (see b_snapshot) */
+ p_vout->p->b_snapshot = false;
+
vout_Snapshot( p_vout, p_directbuffer );
+ }
/*
* Call the plugin-specific rendering method if there is one
More information about the vlc-devel
mailing list