Commit d88917bb authored by sigmunau's avatar sigmunau
Browse files

fixed a bug in the code to handle relative paths. Added support for file://

and http:// items in asx files, and not just mms://
parent 736d5c48
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* m3u.c: a meta demux to parse m3u and asx playlists * m3u.c: a meta demux to parse m3u and asx playlists
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: m3u.c,v 1.4 2002/11/18 13:08:35 gbazin Exp $ * $Id: m3u.c,v 1.5 2002/11/24 01:29:56 sigmunau Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -211,7 +211,7 @@ static int Demux ( input_thread_t *p_input ) ...@@ -211,7 +211,7 @@ static int Demux ( input_thread_t *p_input )
{ {
/* We are dealing with ASX files. /* We are dealing with ASX files.
* We are looking for "href" or "param" html markups that * We are looking for "href" or "param" html markups that
* begins with "mms://" */ * begins with "mms://", "http://" or "file://" */
char *psz_eol; char *psz_eol;
while( *psz_bol && while( *psz_bol &&
...@@ -221,8 +221,13 @@ static int Demux ( input_thread_t *p_input ) ...@@ -221,8 +221,13 @@ static int Demux ( input_thread_t *p_input )
if( !*psz_bol ) continue; if( !*psz_bol ) continue;
while( *psz_bol && strncasecmp( psz_bol, "mms://", while( *psz_bol &&
sizeof("mms://") - 1 ) ) strncasecmp( psz_bol, "mms://",
sizeof("mms://") - 1 ) &&
strncasecmp( psz_bol, "http://",
sizeof("http://") - 1 ) &&
strncasecmp( psz_bol, "file://",
sizeof("file://") - 1 ) )
psz_bol++; psz_bol++;
if( !*psz_bol ) continue; if( !*psz_bol ) continue;
...@@ -240,11 +245,11 @@ static int Demux ( input_thread_t *p_input ) ...@@ -240,11 +245,11 @@ static int Demux ( input_thread_t *p_input )
/* Check if the line has an absolute or relative path */ /* Check if the line has an absolute or relative path */
psz_name = psz_bol; psz_name = psz_bol;
while( *psz_name && strncmp( psz_bol, "://", sizeof("://") - 1 ) ) msg_Dbg( p_input, "this is the current item: <%s>", psz_name );
while( *psz_name && strncmp( psz_name, "://", sizeof("://") - 1 ) )
{ {
psz_name++; psz_name++;
} }
if( !*psz_name ) if( !*psz_name )
{ {
/* the line doesn't specify a protocol name. /* the line doesn't specify a protocol name.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment