[vlc-devel] commit: core: Temporarily fix input_item_SetURI() for 1.0 bugfix. ( Derk-Jan Hartman )
git version control
git at videolan.org
Wed Jun 24 15:44:36 CEST 2009
vlc | branch: 1.0-bugfix | Derk-Jan Hartman <hartman at videolan.org> | Wed Jun 24 15:43:04 2009 +0200| [a4c0b9def174659bf6b4d30dcb6f47f98080e117] | committer: Derk-Jan Hartman
core: Temporarily fix input_item_SetURI() for 1.0 bugfix.
It now will handle both paths and URIs when trying to determine the filename.
This balances [873234a1d0d44731d098003ede8e3b945623bbdc].
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4c0b9def174659bf6b4d30dcb6f47f98080e117
---
src/input/item.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/input/item.c b/src/input/item.c
index 7778ebc..8d47e33 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -361,8 +361,14 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
if( !p_i->psz_name && p_i->i_type == ITEM_TYPE_FILE )
{
- const char *psz_filename = strrchr( p_i->psz_uri, DIR_SEP_CHAR );
- if( psz_filename && *psz_filename == DIR_SEP_CHAR )
+ const char *psz_filename;
+
+ if( !strstr( p_i->psz_uri, "://" ) )
+ psz_filename = strrchr( p_i->psz_uri, '/' );
+ else
+ psz_filename = strrchr( p_i->psz_uri, DIR_SEP_CHAR );
+
+ if( psz_filename && ( *psz_filename == DIR_SEP_CHAR || *psz_filename == '/' ) )
psz_filename++;
if( psz_filename && *psz_filename )
p_i->psz_name = strdup( psz_filename );
More information about the vlc-devel
mailing list