summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/edl-mpv.rst3
-rw-r--r--demux/demux_edl.c17
2 files changed, 0 insertions, 20 deletions
diff --git a/DOCS/edl-mpv.rst b/DOCS/edl-mpv.rst
index c5771c2bca..46a25293aa 100644
--- a/DOCS/edl-mpv.rst
+++ b/DOCS/edl-mpv.rst
@@ -254,6 +254,3 @@ header, the syntax is exactly the same. It's far more convenient to use ``;``
instead of line breaks, but that is orthogonal.
Example: ``edl://f1.mkv,length=5,start=10;f2.mkv,30,20;f3.mkv``
-
-As a quirks, mpv will accept arbitrary paths in EDLs originating from
-``edl://``, while ``.edl`` does not. This makes no sense.
diff --git a/demux/demux_edl.c b/demux/demux_edl.c
index b1f268ad8b..36e74de5a6 100644
--- a/demux/demux_edl.c
+++ b/demux/demux_edl.c
@@ -61,7 +61,6 @@ struct tl_root {
struct priv {
bstr data;
- bool allow_any;
};
// Parse a time (absolute file time or duration). Currently equivalent to a
@@ -398,18 +397,6 @@ error:
return NULL;
}
-// For security, don't allow relative or absolute paths, only plain filenames.
-// Also, make these filenames relative to the edl source file.
-static void fix_filenames(struct tl_parts *parts, char *source_path)
-{
- struct bstr dirname = mp_dirname(source_path);
- for (int n = 0; n < parts->num_parts; n++) {
- struct tl_part *part = &parts->parts[n];
- char *filename = mp_basename(part->filename); // plain filename only
- part->filename = mp_path_join_bstr(parts, dirname, bstr0(filename));
- }
-}
-
static void build_mpv_edl_timeline(struct timeline *tl)
{
struct priv *p = tl->demuxer->priv;
@@ -426,8 +413,6 @@ static void build_mpv_edl_timeline(struct timeline *tl)
for (int n = 0; n < root->num_pars; n++) {
struct tl_parts *parts = root->pars[n];
- if (!p->allow_any)
- fix_filenames(parts, tl->demuxer->filename);
struct timeline_par *par = build_timeline(tl, parts);
if (!par)
break;
@@ -459,8 +444,6 @@ static int try_open_file(struct demuxer *demuxer, enum demux_check check)
struct stream *s = demuxer->stream;
if (s->info && strcmp(s->info->name, "edl") == 0) {
p->data = bstr0(s->path);
- // Source is edl:// and not .edl => allow arbitrary paths
- p->allow_any = true;
return 0;
}
if (check >= DEMUX_CHECK_UNSAFE) {