[vlc-devel] commit: When we fill the name of an input item with URI parts, use decode_URI() so it becomes easier to read. (Derk-Jan Hartman )

git version control git at videolan.org
Tue Jun 23 23:09:36 CEST 2009


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Tue Jun 23 23:06:47 2009 +0200| [c0d7a7d3dddaa6b20cdd0b8c996e62028cba6858] | committer: Derk-Jan Hartman 

When we fill the name of an input item with URI parts, use decode_URI() so it becomes easier to read.

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

 src/input/item.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/input/item.c b/src/input/item.c
index 2397c13..d74ec66 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -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 );




More information about the vlc-devel mailing list