Commit 62fb058c authored by Clément Stenac's avatar Clément Stenac

Skip leading tabs, spaces and line feeds

parent 5f676c10
......@@ -134,6 +134,14 @@ static int Demux( demux_t *p_demux )
i_position = p_playlist->i_index + 1;
while( ( psz_line = stream_ReadLine( p_demux->s ) ) )
{
/* Skip leading tabs and spaces */
while( *psz_line == ' ' || *psz_line == '\t' ||
*psz_line == '\n' || *psz_line == '\r' )
{
psz_line++;
}
if( *psz_line == '#' )
{
/* parse extra info */
......
......@@ -45,7 +45,7 @@ char *stream_ReadLine( stream_t *s )
int i = 0;
i_data = stream_Peek( s, &p_data, MAX_LINE );
while( i < i_data && p_data[i] != '\n' && i < i_data && p_data[i] != '\r')
while( i < i_data && p_data[i] != '\n' && p_data[i] != '\r' )
{
i++;
}
......
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