[vlc-commits] demux: deduplicate get_path()
Rémi Denis-Courmont
git at videolan.org
Sun Jul 26 16:25:38 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 26 17:25:18 2015 +0300| [4dfbfbbb69c6b7c08483d21d4eed07caf7816e0d] | committer: Rémi Denis-Courmont
demux: deduplicate get_path()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4dfbfbbb69c6b7c08483d21d4eed07caf7816e0d
---
src/input/demux.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/src/input/demux.c b/src/input/demux.c
index fbc3cf7..2005b4f 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -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:
More information about the vlc-commits
mailing list