]> git.sesse.net Git - vlc/blobdiff - modules/visualization/goom.c
Revert previous commit, and updates faac & live-config patches
[vlc] / modules / visualization / goom.c
index 694f1a38ea1089cc85f86209dbb5098d7c49d63f..3d8c7f67520b8de57cd94f1ab0ef7f2ed0f0b822 100644 (file)
@@ -25,8 +25,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>                                              /* strdup() */
 #include <errno.h>
 
 #include <vlc/vlc.h>
@@ -416,14 +414,12 @@ static char *TitleGet( vlc_object_t *p_this )
 
     if( p_input )
     {
-        if( input_GetItem(p_input)->p_meta->psz_title &&
-                *input_GetItem(p_input)->p_meta->psz_title )
+        psz_title = input_item_GetTitle( input_GetItem( p_input ) );
+        if( EMPTY_STR( psz_title ) )
         {
-            psz_title = strdup( input_GetItem(p_input)->p_meta->psz_title );
-        }
-        else
-        {
-            char *psz = strrchr( input_GetItem(p_input)->psz_uri, '/' );
+            free( psz_title );
+            char *psz_orig = input_item_GetURI( input_GetItem( p_input ) );
+            char *psz = strrchr( psz_orig, '/' );
 
             if( psz )
             {
@@ -431,12 +427,13 @@ static char *TitleGet( vlc_object_t *p_this )
             }
             else
             {
-                psz = input_GetItem(p_input)->psz_uri;
+                psz = psz_orig;
             }
             if( psz && *psz )
             {
                 psz_title = strdup( psz );
             }
+            free( psz_orig );
         }
         vlc_object_release( p_input );
     }