[vlc-devel] commit: A really small optim (art fetcher). (Laurent Aimar )

git version control git at videolan.org
Sun Apr 26 15:50:09 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Apr 26 15:49:23 2009 +0200| [5091d5e196ec2c49eff32f6ccbea193b9ea9f848] | committer: Laurent Aimar 

A really small optim (art fetcher).

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

 src/playlist/fetcher.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/playlist/fetcher.c b/src/playlist/fetcher.c
index 787e400..6136d4c 100644
--- a/src/playlist/fetcher.c
+++ b/src/playlist/fetcher.c
@@ -197,10 +197,6 @@ static int FindArt( playlist_fetcher_t *p_fetcher, input_item_t *p_item )
     /* */
     psz_album = input_item_GetAlbum( p_item );
     psz_artist = input_item_GetArtist( p_item );
-    psz_title = input_item_GetTitle( p_item );
-    if( !psz_title )
-        psz_title = input_item_GetName( p_item );
-
     if( psz_album && psz_artist )
     {
         msg_Dbg( p_fetcher, "searching art for %s - %s",
@@ -208,10 +204,13 @@ static int FindArt( playlist_fetcher_t *p_fetcher, input_item_t *p_item )
     }
     else
     {
-        msg_Dbg( p_fetcher, "searching art for %s",
-             psz_title );
+        psz_title = input_item_GetTitle( p_item );
+        if( !psz_title )
+            psz_title = input_item_GetName( p_item );
+
+        msg_Dbg( p_fetcher, "searching art for %s", psz_title );
+        free( psz_title );
     }
-    free( psz_title );
 
     /* Fetch the art url */
     p_fetcher->p_private = p_item;




More information about the vlc-devel mailing list