]> git.sesse.net Git - vlc/blobdiff - modules/demux/m3u.c
* modules/demux/sgimb.c
[vlc] / modules / demux / m3u.c
index e3dd77eb5a7926dd8b0ec09d06074a4bbd30ed10..681ee8a52f3614bab63dba05f6fe6262b48cf809 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * m3u.c: a meta demux to parse pls, m3u, asx et b4s playlists
  *****************************************************************************
- * Copyright (C) 2001 VideoLAN
- * $Id: m3u.c,v 1.23 2003/07/23 01:13:47 gbazin Exp $
+ * Copyright (C) 2001-2004 VideoLAN
+ * $Id$
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -60,7 +60,7 @@ static int  Demux ( input_thread_t * );
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("playlist metademux") );
+    set_description( _("Playlist metademux") );
     set_capability( "demux", 180 );
     set_callbacks( Activate, Deactivate );
     add_shortcut( "m3u" );
@@ -121,8 +121,8 @@ static int Activate( vlc_object_t * p_this )
 
     /* we had no luck looking at the file extention, so we have a look
      * at the content. This is useful for .asp, .php and similar files
-     * that are actually html. Also useful for som asx files that have
-     * another extention */
+     * that are actually html. Also useful for some asx files that have
+     * another extension */
     /* XXX we double check for file != m3u as some asx ... are just m3u file */
     if( i_type != TYPE_M3U )
     {
@@ -155,10 +155,12 @@ static int Activate( vlc_object_t * p_this )
             {
                 i_type2 = TYPE_ASX;
             }
+#if 0
             else if ( !strncasecmp( p_peek, "<?xml", sizeof("<?xml") -1 ) )
             {
                 i_type2 = TYPE_B4S;
             }
+#endif
         }
     }
     if ( i_type == TYPE_UNKNOWN && i_type2 == TYPE_UNKNOWN)
@@ -551,9 +553,9 @@ static void ProcessLine ( input_thread_t *p_input, playlist_t *p_playlist,
 
     if( b_next && *ppsz_uri )
     {
-        playlist_AddName( p_playlist,
-                          *ppsz_name ? *ppsz_name : *ppsz_uri, *ppsz_uri,
-                          0, 0, PLAYLIST_INSERT, *pi_position );
+        playlist_Add( p_playlist, *ppsz_uri,
+                         *ppsz_name ? *ppsz_name : *ppsz_uri,
+                          PLAYLIST_INSERT, *pi_position );
         (*pi_position)++;
         if( *ppsz_name )
         {
@@ -660,7 +662,7 @@ static int Demux ( input_thread_t *p_input )
         /* is there a pendding uri without b_next */
         if( psz_uri )
         {
-            playlist_Add( p_playlist, psz_uri, 0, 0,
+            playlist_Add( p_playlist, psz_uri, psz_uri,
                           PLAYLIST_INSERT, i_position );
         }
     }