[vlc-commits] libvlc: fix small race

Rémi Denis-Courmont git at videolan.org
Sun Feb 8 15:35:57 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb  8 16:34:45 2015 +0200| [dbe58b27d376581410510ffd387ab08a76e08bbb] | committer: Rémi Denis-Courmont

libvlc: fix small race

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

 lib/media_player.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/media_player.c b/lib/media_player.c
index 9fd10b8..b41d6f3 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -933,14 +933,12 @@ int libvlc_media_player_is_playing( libvlc_media_player_t *p_mi )
  **************************************************************************/
 void libvlc_media_player_stop( libvlc_media_player_t *p_mi )
 {
-    libvlc_state_t state = libvlc_media_player_get_state( p_mi );
-
     lock_input(p_mi);
     release_input_thread( p_mi ); /* This will stop the input thread */
 
     /* Force to go to stopped state, in case we were in Ended, or Error
      * state. */
-    if( state != libvlc_Stopped )
+    if( p_mi->state != libvlc_Stopped )
     {
         set_state( p_mi, libvlc_Stopped, false );
 



More information about the vlc-commits mailing list