libvlc_media_player_retain: missing lock
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 13 May 2009 15:51:01 +0000 (18:51 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 13 May 2009 15:51:35 +0000 (18:51 +0300)
src/control/media_player.c

index 19dd794..98ca4b3 100644 (file)
@@ -473,10 +473,11 @@ void libvlc_media_player_release( libvlc_media_player_t *p_mi )
  **************************************************************************/
 void libvlc_media_player_retain( libvlc_media_player_t *p_mi )
 {
-    if( !p_mi )
-        return;
+    assert( p_mi );
 
+    vlc_mutex_lock( &p_mi->object_lock );
     p_mi->i_refcount++;
+    vlc_mutex_unlock( &p_mi->object_lock );
 }
 
 /**************************************************************************