* Add the directory part of the playlist file to the start of the
* mrl, if the mrl is a relative file path
*/
-char *ProcessMRL( char *psz_mrl, char *psz_prefix )
+char *ProcessMRL( const char *psz_mrl, const char *psz_prefix )
{
/* Check for a protocol name.
* for URL, we should look for "://"
if( strchr( psz_mrl, ':' ) ) return strdup( psz_mrl );
/* This a relative path, prepend the prefix */
- if( asprintf( &psz_mrl, "%s%s", psz_prefix, psz_mrl ) != -1 )
- return psz_mrl;
- else
- return NULL;
+ char *ret;
+ if( asprintf( &ret, "%s%s", psz_prefix, psz_mrl ) == -1 )
+ ret = NULL;
+ return ret;
}
#include <vlc_input.h>
#include <vlc_playlist.h>
-char *ProcessMRL( char *, char * );
+char *ProcessMRL( const char *, const char * );
char *FindPrefix( demux_t * );
int Import_Old ( vlc_object_t * );