summaryrefslogtreecommitdiffstats
path: root/demux/demux_edl.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-02 18:24:27 +0100
committerwm4 <wm4@nowhere>2017-02-02 18:26:58 +0100
commitfb9a32977d6abf4c83a92d993af58e393819c062 (patch)
treedaa8fac391c393560588ce8653943a8259f59815 /demux/demux_edl.c
parente13a62fc346867450cd41d02cffbdaf477a3fec4 (diff)
downloadmpv-fb9a32977d6abf4c83a92d993af58e393819c062.tar.bz2
mpv-fb9a32977d6abf4c83a92d993af58e393819c062.tar.xz
stream: get rid of streamtype enum
Because it's kind of dumb. (But not sure if it was worth the trouble.) For stream_file.c, we add new explicit fields. The rest are rather special uses and can be killed by comparing the stream impl. name. The changes to DVD/BD/CD/TV are entirely untested.
Diffstat (limited to 'demux/demux_edl.c')
-rw-r--r--demux/demux_edl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/demux/demux_edl.c b/demux/demux_edl.c
index 623cae35b3..240c224ab7 100644
--- a/demux/demux_edl.c
+++ b/demux/demux_edl.c
@@ -50,6 +50,7 @@ struct tl_parts {
struct priv {
bstr data;
+ bool allow_any;
};
// Parse a time (absolute file time or duration). Currently equivalent to a
@@ -286,8 +287,7 @@ static void build_mpv_edl_timeline(struct timeline *tl)
return;
}
MP_TARRAY_APPEND(tl, tl->sources, tl->num_sources, tl->demuxer);
- // Source is .edl and not edl:// => don't allow arbitrary paths
- if (tl->demuxer->stream->uncached_type != STREAMTYPE_EDL)
+ if (!p->allow_any)
fix_filenames(parts, tl->demuxer->filename);
build_timeline(tl, parts);
talloc_free(parts);
@@ -303,8 +303,10 @@ static int try_open_file(struct demuxer *demuxer, enum demux_check check)
demuxer->fully_read = true;
struct stream *s = demuxer->stream;
- if (s->uncached_type == STREAMTYPE_EDL) {
+ 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) {