]> git.sesse.net Git - vlc/commitdiff
goom: simplify.
authorRémi Duraffort <ivoire@videolan.org>
Sun, 19 Jun 2011 09:41:00 +0000 (11:41 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 19 Jun 2011 09:41:00 +0000 (11:41 +0200)
modules/visualization/goom.c

index 4d5ea6c32fa9e3f0e3a6d53b4e86443b476c181e..c4ba551c6179b3711335e09e8315dcff3e499a39 100644 (file)
@@ -406,24 +406,11 @@ static void Close( vlc_object_t *p_this )
 static char *TitleGet( vlc_object_t *p_this )
 {
     input_thread_t *p_input = playlist_CurrentInput( pl_Get( p_this ) );
-    if( !p_input )
-        return NULL;
-
-    char *psz_title = input_item_GetTitle( input_GetItem( p_input ) );
-    if( EMPTY_STR( psz_title ) )
+    if( p_input )
     {
-        free( psz_title );
-
-        char *psz_uri = input_item_GetURI( input_GetItem( p_input ) );
-        const char *psz = strrchr( psz_uri, '/' );
-        if( psz )
-        {
-            psz_title = strdup( psz + 1 );
-            free( psz_uri );
-        }
-        else
-            psz_title = psz_uri;
+        char *psz_title = input_item_GetTitleFbName( input_GetItem( p_input ) );
+        vlc_object_release( p_input );
+        return psz_title;
     }
-    vlc_object_release( p_input );
-    return psz_title;
+    return NULL;
 }