]> git.sesse.net Git - vlc/commitdiff
Mac OS X gui: Make sure we don't retain p_input more than once. Don't release it...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 4 Mar 2007 02:03:44 +0000 (02:03 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 4 Mar 2007 02:03:44 +0000 (02:03 +0000)
modules/gui/macosx/intf.m
modules/gui/macosx/prefs.m

index 4023f481234ecf43487e02317c89df19b520f70d..5d9cc3c9aced248c3203930ad1d0b50744deac3a 100644 (file)
@@ -1086,6 +1086,8 @@ static VLCMain *_o_sharedMainInstance = nil;
         p_intf->p_sys->b_current_title_update = VLC_TRUE;
         p_intf->p_sys->b_intf_update = VLC_TRUE;
         p_intf->p_sys->b_input_update = VLC_FALSE;
+        if( p_intf->p_sys->p_input )
+            vlc_object_yield( p_intf->p_sys->p_input );
     }
     if( p_intf->p_sys->b_intf_update )
     {
@@ -1103,7 +1105,6 @@ static VLCMain *_o_sharedMainInstance = nil;
 
         if( ( b_input = ( p_intf->p_sys->p_input != NULL ) ) )
         {
-            vlc_object_yield( p_intf->p_sys->p_input );
             /* seekable streams */
             b_seekable = var_GetBool( p_intf->p_sys->p_input, "seekable" );
 
@@ -1112,7 +1113,6 @@ static VLCMain *_o_sharedMainInstance = nil;
 
             /* chapters & titles */
             //b_chapters = p_intf->p_sys->p_input->stream.i_area_nb > 1;
-            vlc_object_release( p_intf->p_sys->p_input );
         }
 
         [o_btn_stop setEnabled: b_input];
@@ -1551,6 +1551,11 @@ static VLCMain *_o_sharedMainInstance = nil;
     vout_thread_t * p_vout;
     int returnedValue = 0;
     
+    if (p_intf->p_sys->p_input)
+    {
+        vlc_object_release( p_intf->p_sys->p_input );
+        p_intf->p_sys->p_input = NULL;
+    }
     /* Stop playback */
     p_playlist = pl_Yield( p_intf );
     playlist_Stop( p_playlist );
index 133bd027d26d3e24bed96821cc98baf73c5226b7..d8eaf77487522694ba0740eda188eec44de3781d 100644 (file)
@@ -367,6 +367,7 @@ static VLCTreeItem *o_root_item = nil;
                         
                         break;
                     default:
+                        NSLog(@"unknow item in pref");
                         break;
                     }
                 } while( p_item < p_end && p_item++ );
@@ -531,7 +532,7 @@ static VLCTreeItem *o_root_item = nil;
     o_view = [[VLCFlippedView alloc] initWithFrame: s_vrc];
     [o_view setAutoresizingMask: NSViewWidthSizable | NSViewMinYMargin |
                                     NSViewMaxYMargin];
-
+NSLog(@"%s", __FUNCTION__);
 /* Create all subviews if it isn't already done because we cannot use */
 /* setHiden for MacOS < 10.3*/
     if( o_subviews == nil )