]> git.sesse.net Git - vlc/commitdiff
Qt4 - playlist, Don't fetch name if you have title. Less memory used, I think.
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 26 Jan 2008 03:44:38 +0000 (03:44 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 26 Jan 2008 03:44:38 +0000 (03:44 +0000)
modules/gui/qt4/components/playlist/playlist_model.cpp

index d9a30d218f646a606403cbe5fd90c6e83d4dc0b6..3fab8bdbe2b4db635bd993556f4d9956ee586761 100644 (file)
@@ -225,19 +225,22 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
                 ADD_META( p_item, Artist );
                 break;
             case VLC_META_ENGINE_TITLE:
-                char *psz_title, *psz_name;
+                char *psz_title;
                 psz_title = input_item_GetTitle( p_item->p_input );
-                psz_name = input_item_GetName( p_item->p_input );
                 if( psz_title )
                 {
                     ADD_META( p_item, Title );
+                    free( psz_title );
                 }
-                else if( psz_name )
+                else
                 {
-                    item_col_strings.append( qfu( psz_name ) );
+                    psz_title = input_item_GetName( p_item->p_input );
+                    if( psz_title )
+                    {
+                        item_col_strings.append( qfu( psz_title ) );
+                    }
+                    free( psz_title );
                 }
-                free( psz_title );
-                free( psz_name );
                 break;
             case VLC_META_ENGINE_DESCRIPTION:
                 ADD_META( p_item, Description );