[vlc-devel] commit: Added missing lock for INPUT_EVENT_ABORT check (input). ( Laurent Aimar )

git version control git at videolan.org
Fri Mar 13 00:30:20 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Mar 13 00:29:19 2009 +0100| [25de145c19d5f470662420cffe0d3faf06c6bcd9] | committer: Laurent Aimar 

Added missing lock for INPUT_EVENT_ABORT check (input).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=25de145c19d5f470662420cffe0d3faf06c6bcd9
---

 src/input/input.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 8cae4df..9c6db1b 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -511,7 +511,11 @@ static void *Run( vlc_object_t *p_this )
 
 exit:
     /* Tell we're dead */
-    if( p_input->p->b_abort )
+    vlc_mutex_lock( &p_input->p->lock_control );
+    const bool b_abort = p_input->p->b_abort;
+    vlc_mutex_unlock( &p_input->p->lock_control );
+
+    if( b_abort )
         input_SendEventAbort( p_input );
     input_SendEventDead( p_input );
 




More information about the vlc-devel mailing list