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 8cae4df..9c6db1b 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 );