[vlc-commits] Revert "lua_http: fix name parsing on encoded uri"

Rémi Denis-Courmont git at videolan.org
Sun Sep 25 13:43:02 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Sep 25 14:42:56 2011 +0300| [6896098e71b75f50199f339a7853a2855f82aceb] | committer: Rémi Denis-Courmont

Revert "lua_http: fix name parsing on encoded uri"

This reverts commit d0031ad29ccc52fb08e0257b0f4a76d34144d56c.

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

 modules/lua/vlc.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c
index fd8a511..fd90076 100644
--- a/modules/lua/vlc.c
+++ b/modules/lua/vlc.c
@@ -500,7 +500,6 @@ int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                 if( lua_isstring( L, -1 ) )
                 {
                     const char   *psz_path     = NULL;
-                    char         *psz_u8path   = NULL;
                     const char   *psz_name     = NULL;
                     char        **ppsz_options = NULL;
                     int           i_options    = 0;
@@ -521,15 +520,7 @@ int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                     {
                         if( !lua_isnil( L, -1 ) )
                             msg_Warn( p_this, "Playlist item name should be a string." );
-
-                        psz_u8path = make_path( psz_path );
-                        if ( psz_u8path )
-                        {
-                            psz_name = strrchr( psz_u8path, '/' );
-                            if ( psz_name != NULL )
-                                psz_name++;
-                        }
-                        if ( !psz_name ) psz_name = psz_path;
+                        psz_name = psz_path;
                     }
 
                     /* Read duration */
@@ -583,7 +574,6 @@ int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                     while( i_options > 0 )
                         free( ppsz_options[--i_options] );
                     free( ppsz_options );
-                    free( psz_u8path );
                 }
                 else
                 {



More information about the vlc-commits mailing list