[vlc-devel] commit: itml: the core knows how to handle file://localhost/ ( Rémi Duraffort )

git version control git at videolan.org
Thu Jul 16 07:48:22 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jul 16 07:47:56 2009 +0200| [990fd1cd60af8de8ded6d8aa0dc2e2ad3e5f2954] | committer: Rémi Duraffort 

itml: the core knows how to handle file://localhost/

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

 modules/demux/playlist/itml.c |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/modules/demux/playlist/itml.c b/modules/demux/playlist/itml.c
index 6dc87bf..2d85d17 100644
--- a/modules/demux/playlist/itml.c
+++ b/modules/demux/playlist/itml.c
@@ -376,26 +376,16 @@ static bool parse_track_dict( demux_t *p_demux, input_item_t *p_input_item,
 
     if( psz_uri )
     {
-        if( strlen( psz_uri ) > 17 &&
-            !strncmp( psz_uri, "file://localhost/", 17 ) )
-        {
-            /* remove 'localhost/' */
-            memmove( psz_uri + 7, psz_uri + 17, strlen( psz_uri ) - 9 );
-            msg_Info( p_demux, "Adding '%s'", psz_uri );
+        msg_Info( p_demux, "Adding '%s'", psz_uri );
 
-            p_new_input = input_item_New( p_demux, psz_uri, NULL );
-            input_item_AddSubItem( p_input_item, p_new_input );
+        p_new_input = input_item_New( p_demux, psz_uri, NULL );
+        input_item_AddSubItem( p_input_item, p_new_input );
 
-            /* add meta info */
-            add_meta( p_new_input, p_track );
-            vlc_gc_decref( p_new_input );
+        /* add meta info */
+        add_meta( p_new_input, p_track );
+        vlc_gc_decref( p_new_input );
 
-            p_demux->p_sys->i_ntracks++;
-        }
-        else
-        {
-            msg_Err( p_demux, "Don't know how to handle %s", psz_uri );
-        }
+        p_demux->p_sys->i_ntracks++;
         free( psz_uri );
     }
 




More information about the vlc-devel mailing list