]> git.sesse.net Git - vlc/blobdiff - modules/demux/m3u.c
* modules/demux/mpeg/Modules.am: forgot to remove private.h.
[vlc] / modules / demux / m3u.c
index c97699c92f524828695ced1bef282bee71793762..3668de9207a2ab65c80c8705e91be91052c20730 100644 (file)
@@ -2,7 +2,7 @@
  * m3u.c: a meta demux to parse pls, m3u, asx et b4s playlists
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: m3u.c,v 1.22 2003/06/29 19:15:04 fenrir Exp $
+ * $Id: m3u.c,v 1.25 2004/01/05 13:07:02 zorglub Exp $
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -551,9 +551,8 @@ 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,
+        playlist_Add( p_playlist, *ppsz_uri,
+                         *ppsz_name ? *ppsz_name : *ppsz_uri,
                           PLAYLIST_INSERT, *pi_position );
         (*pi_position)++;
         if( *ppsz_name )
@@ -645,7 +644,8 @@ static int Demux ( input_thread_t *p_input )
             psz_line[i_linepos] = '\0';
             i_linepos = 0;
 
-            ProcessLine( p_input, p_playlist, psz_line, &psz_uri, &psz_name, &i_position );
+            ProcessLine( p_input, p_playlist, psz_line, &psz_uri, &psz_name,
+                         &i_position );
         }
 
         input_DeletePacket( p_input->p_method_data, p_data );
@@ -655,11 +655,13 @@ static int Demux ( input_thread_t *p_input )
     {
         psz_line[i_linepos] = '\0';
 
-        ProcessLine( p_input, p_playlist, psz_line, &psz_uri, &psz_name, &i_position );
+        ProcessLine( p_input, p_playlist, psz_line, &psz_uri, &psz_name,
+                     &i_position );
         /* is there a pendding uri without b_next */
         if( psz_uri )
         {
-            playlist_Add( p_playlist, psz_uri, PLAYLIST_INSERT, i_position );
+            playlist_Add( p_playlist, psz_uri, psz_uri,
+                          PLAYLIST_INSERT, i_position );
         }
     }