]> git.sesse.net Git - vlc/commitdiff
macosx: work-around a deprecated method and ask the playlist properly for its size
authorFelix Paul Kühne <fkuehne@videolan.org>
Mon, 13 Apr 2009 11:04:27 +0000 (13:04 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 13 Apr 2009 11:04:27 +0000 (13:04 +0200)
modules/gui/macosx/intf.m

index e1fc00eb91a2ae71c3673f33d9bb2bcf2202d9c0..30eb9d5c2a7170ac5e7936f2c3dda412706a6d61 100644 (file)
@@ -1574,10 +1574,12 @@ static void manage_cleanup( void * args )
 
         playlist_t * p_playlist = pl_Hold( p_intf );
 
-        /* TODO: fix i_size use */
-        b_plmul = p_playlist->items.i_size > 1;
+        PL_LOCK;
+        b_plmul = playlist_CurrentSize( p_playlist ) > 1;
+        PL_UNLOCK;
 
         p_input = playlist_CurrentInput( p_playlist );
+
         bool b_buffering = NO;
     
         if( ( b_input = ( p_input != NULL ) ) )
@@ -2500,13 +2502,11 @@ end:
 
     [o_msg_lock lock];
 
-    if( [o_msg_arr count] + 2 > 400 )
+    if( [o_msg_arr count] + 2 > 600 )
     {
-        NSUInteger rid[] = { 0, 1 };
-               /* FIXME: THIS METHOD WILL BE DEPRECATED */
-        [o_msg_arr removeObjectsFromIndices: (NSUInteger *)&rid
-                                 numIndices: sizeof(rid)/sizeof(rid[0])];
-    }
+               [o_msg_arr removeObjectAtIndex: 0];
+        [o_msg_arr removeObjectAtIndex: 1];
+   }
 
     o_attr = [NSDictionary dictionaryWithObject: o_gray
                                          forKey: NSForegroundColorAttributeName];