From 04bdd7af72aa9ab5aa81e38ca85d3f40e76f16d4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 19 Nov 2013 22:26:35 +0100 Subject: timeline: add edl:// URIs Questionable change from user perspective, but internally needed to implement the next commit. Also useful for testing timeline stuff. --- mpvcore/player/timeline/tl_edl.c | 4 +++- mpvcore/player/timeline/tl_mpv_edl.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'mpvcore') diff --git a/mpvcore/player/timeline/tl_edl.c b/mpvcore/player/timeline/tl_edl.c index b4715e5a1f..7fe6547c35 100644 --- a/mpvcore/player/timeline/tl_edl.c +++ b/mpvcore/player/timeline/tl_edl.c @@ -70,7 +70,9 @@ void build_edl_timeline(struct MPContext *mpctx) struct bstr *lines = bstr_splitlines(tmpmem, mpctx->demuxer->file_contents); int linec = MP_TALLOC_ELEMS(lines); struct bstr header = bstr0("mplayer EDL file, version "); - if (bstr_startswith0(lines[0], "mpv EDL v0\n")) { + if (bstr_startswith0(lines[0], "mpv EDL v0\n") || + mpctx->demuxer->stream->uncached_type == STREAMTYPE_EDL) + { build_mpv_edl_timeline(mpctx); goto out; } diff --git a/mpvcore/player/timeline/tl_mpv_edl.c b/mpvcore/player/timeline/tl_mpv_edl.c index 4c44ea9fc8..1f4bbc268e 100644 --- a/mpvcore/player/timeline/tl_mpv_edl.c +++ b/mpvcore/player/timeline/tl_mpv_edl.c @@ -268,8 +268,9 @@ void build_mpv_edl_timeline(struct MPContext *mpctx) mp_msg(MSGT_CPLAYER, MSGL_ERR, "Error in EDL.\n"); return; } - // Don't allow arbitrary paths - fix_filenames(parts, mpctx->demuxer->filename); + // Source is .edl and not edl:// => don't allow arbitrary paths + if (mpctx->demuxer->stream->uncached_type != STREAMTYPE_EDL) + fix_filenames(parts, mpctx->demuxer->filename); build_timeline(mpctx, parts); talloc_free(parts); } -- cgit v1.2.3