]> git.sesse.net Git - vlc/commitdiff
When we fill the name of an input item with URI parts, use decode_URI() so it becomes...
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 23 Jun 2009 21:06:47 +0000 (23:06 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 23 Jun 2009 21:06:47 +0000 (23:06 +0200)
src/input/item.c

index 2397c13c55c4ce397afa406cf9b56a7499a2acaa..d74ec6689e3a195c69ff56bf7caa95ebcc0125b9 100644 (file)
@@ -366,6 +366,10 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
             psz_filename++;
         if( psz_filename && *psz_filename )
             p_i->psz_name = strdup( psz_filename );
+
+        /* Make the name more readable */
+        if( p_i->psz_name )
+            decode_URI( p_i->psz_name );
     }
 
     /* The name is NULL: fill it with everything except login and password */
@@ -397,6 +401,10 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
         vlc_UrlClean( &url );
         if( -1==r )
             p_i->psz_name=NULL; /* recover from undefined value */
+
+        /* Make the name more readable */
+        if( p_i->psz_name )
+            decode_URI( p_i->psz_name );
     }
 
     vlc_mutex_unlock( &p_i->lock );