for( list<string>::const_iterator it = files.begin();
it != files.end(); ++it, i_pos++, first = false )
{
- char* psz_uri = make_URI( it->c_str(), NULL );
- if( !psz_uri )
- continue;
+ input_item_t *pItem;
- input_item_t* pItem = input_item_New( psz_uri, NULL );
- if( pItem )
+ if( strstr( it->c_str(), "://" ) )
+ pItem = input_item_New( it->c_str(), NULL );
+ else
{
- int i_mode = PLAYLIST_APPEND;
- if( first && start )
- i_mode |= PLAYLIST_GO;
-
- playlist_NodeAddInput( m_pPlaylist, pItem, p_node,
- i_mode, i_pos, pl_Locked );
+ char *psz_uri = vlc_path2uri( it->c_str(), NULL );
+ if( psz_uri == NULL )
+ continue;
+ pItem = input_item_New( psz_uri, NULL );
+ free( psz_uri );
}
- free( psz_uri );
+
+ if( pItem == NULL)
+ continue;
+
+ int i_mode = PLAYLIST_APPEND;
+ if( first && start )
+ i_mode |= PLAYLIST_GO;
+
+ playlist_NodeAddInput( m_pPlaylist, pItem, p_node,
+ i_mode, i_pos, pl_Locked );
}
fin: