]> git.sesse.net Git - vlc/commitdiff
Added missing lock for INPUT_EVENT_ABORT check (input).
authorLaurent Aimar <fenrir@videolan.org>
Thu, 12 Mar 2009 23:29:19 +0000 (00:29 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 12 Mar 2009 23:29:19 +0000 (00:29 +0100)
src/input/input.c

index 8cae4df5f17c28790171ea2c4fe40a0b47d898c2..9c6db1be75bb913683831b5e898a2b2a09a23309 100644 (file)
@@ -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 );