Commit c0d7a7d3 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

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

When we fill the name of an input item with URI parts, use decode_URI() so it becomes easier to read.
parent d704062a
...@@ -366,6 +366,10 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri ) ...@@ -366,6 +366,10 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
psz_filename++; psz_filename++;
if( psz_filename && *psz_filename ) if( psz_filename && *psz_filename )
p_i->psz_name = strdup( 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 */ /* 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 ) ...@@ -397,6 +401,10 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
vlc_UrlClean( &url ); vlc_UrlClean( &url );
if( -1==r ) if( -1==r )
p_i->psz_name=NULL; /* recover from undefined value */ 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 ); vlc_mutex_unlock( &p_i->lock );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment