[vlc-devel] commit: macosx: Use playlist_CurrentInput(). (Pierre d'Herbemont )

git version control git at videolan.org
Sat Jul 5 15:47:49 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Jul  5 15:11:32 2008 +0200| [560016e367f498eccd4559a6c939895ef9ffbe26]

macosx: Use playlist_CurrentInput().

This should fix some race condition of freed input usage.

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

 modules/gui/macosx/intf.m |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 912dcb6..639cf27 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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;
         }
 




More information about the vlc-devel mailing list