]> git.sesse.net Git - vlc/commitdiff
macosx: Use playlist_CurrentInput().
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 5 Jul 2008 13:11:32 +0000 (15:11 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 5 Jul 2008 13:50:01 +0000 (15:50 +0200)
This should fix some race condition of freed input usage.

modules/gui/macosx/intf.m

index 912dcb6a2a54edf84c4947d4b5ba35cf438da381..639cf2786f7d5d1c114a5056612fe46126ce1e64 100644 (file)
@@ -1155,7 +1155,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 
         if( p_intf->p_sys->p_input == NULL )
         {
-            p_intf->p_sys->p_input = p_playlist->p_input;
+            p_intf->p_sys->p_input = playlist_CurrentInput( p_playlist );
 
             /* Refresh the interface */
             if( p_intf->p_sys->p_input )
@@ -1170,6 +1170,7 @@ static VLCMain *_o_sharedMainInstance = nil;
             p_intf->p_sys->b_intf_update = true;
             p_intf->p_sys->i_play_status = END_S;
             msg_Dbg( p_intf, "input has stopped, refreshing interface" );
+            vlc_object_release( p_intf->p_sys->p_input );
             p_intf->p_sys->p_input = NULL;
         }