]> git.sesse.net Git - vlc/blobdiff - src/playlist/thread.c
playlist: Set the playlist input thread before triggering a callback
[vlc] / src / playlist / thread.c
index b865af878922c8dab174af76be2a7ed259ff1d35..12a452d67cf247e243b78baeadc0a488efe40687 100644 (file)
@@ -235,10 +235,13 @@ static bool PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
     }
     free( psz_arturl );
 
+    PL_LOCK;
+    p_sys->p_input = p_input_thread;
+    PL_UNLOCK;
+
     var_TriggerCallback( p_playlist, "activity" );
 
     PL_LOCK;
-    p_sys->p_input = p_input_thread;
     return p_input_thread != NULL;
 }