Commit 4dfbfbbb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

demux: deduplicate get_path()

parent 342acefa
......@@ -25,6 +25,7 @@
# include "config.h"
#endif
#include "access.h"
#include "demux.h"
#include <libvlc.h>
#include <vlc_codec.h>
......@@ -35,23 +36,6 @@
static bool SkipID3Tag( demux_t * );
static bool SkipAPETag( demux_t *p_demux );
/* Decode URL (which has had its scheme stripped earlier) to a file path. */
/* XXX: evil code duplication from access.c */
static char *get_path(const char *location)
{
char *url, *path;
/* Prepending "file://" is a bit hackish. But then again, we do not want
* to hard-code the list of schemes that use file paths in make_path().
*/
if (asprintf(&url, "file://%s", location) == -1)
return NULL;
path = make_path (url);
free (url);
return path;
}
#undef demux_New
/*****************************************************************************
* demux_New:
......
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