[vlc-devel] commit: playlist: Fix a typo and an unecessary loop. (Pierre d'Herbemont )

git version control git at videolan.org
Sun Jul 13 23:56:42 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Jul 13 23:53:07 2008 +0200| [564cbeaebc459419ace02a7f50b1ba78fc2da0b5]

playlist: Fix a typo and an unecessary loop.

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

 src/playlist/control.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/playlist/control.c b/src/playlist/control.c
index 8f3e48a..0b7ae07 100644
--- a/src/playlist/control.c
+++ b/src/playlist/control.c
@@ -218,8 +218,6 @@ int playlist_PreparseEnqueueItem( playlist_t *p_playlist,
 int playlist_AskForArtEnqueue( playlist_t *p_playlist,
                                input_item_t *p_item )
 {
-    int i;
-
     vlc_object_lock( p_playlist->p_fetcher );
     if( !vlc_object_alive( p_playlist->p_fetcher ) )
     {
@@ -227,11 +225,10 @@ int playlist_AskForArtEnqueue( playlist_t *p_playlist,
         return VLC_EGENERIC;
     }
 
-    for( i = 0; i < p_playlist->p_fetcher->i_waiting ; i++ );
     vlc_gc_incref( p_item );
     INSERT_ELEM( p_playlist->p_fetcher->pp_waiting,
                  p_playlist->p_fetcher->i_waiting,
-                 i, p_item );
+                 p_playlist->p_fetcher->i_waiting, p_item );
     vlc_object_signal_unlocked( p_playlist->p_fetcher );
     vlc_object_unlock( p_playlist->p_fetcher );
     return VLC_SUCCESS;
@@ -243,7 +240,7 @@ static void PreparseEnqueueItemSub( playlist_t *p_playlist,
     int i;
     if( p_item->i_children == -1 )
     {
-        vlc_gc_incref( p_item );
+        vlc_gc_incref( p_item->p_input );
         INSERT_ELEM( p_playlist->p_preparse->pp_waiting,
                      p_playlist->p_preparse->i_waiting,
                      p_playlist->p_preparse->i_waiting,




More information about the vlc-devel mailing list