[vlc-commits] remoteosd: fix data race
Rémi Denis-Courmont
git at videolan.org
Thu Jul 9 20:34:18 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 9 21:20:01 2015 +0300| [f332147fd06d53f842b4fe6be8efe8a225a59d67] | committer: Rémi Denis-Courmont
remoteosd: fix data race
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f332147fd06d53f842b4fe6be8efe8a225a59d67
---
modules/video_filter/remoteosd.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/modules/video_filter/remoteosd.c b/modules/video_filter/remoteosd.c
index 6ec1efd..6710576 100644
--- a/modules/video_filter/remoteosd.c
+++ b/modules/video_filter/remoteosd.c
@@ -960,18 +960,14 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
subpicture_t *p_spu;
subpicture_region_t *p_region;
video_format_t fmt;
- picture_t *p_pic;
-
- if( !p_sys->b_need_update )
- {
- return NULL;
- }
+ picture_t *p_pic = NULL;
vlc_mutex_lock( &p_sys->lock );
- p_pic = p_sys->p_pic;
+ if( p_sys->b_need_update )
+ p_pic = p_sys->p_pic;
- if( !p_pic )
+ if( p_pic == NULL )
{
vlc_mutex_unlock( &p_sys->lock );
return NULL;
More information about the vlc-commits
mailing list