diff options
author | wm4 <wm4@nowhere> | 2013-11-19 22:26:35 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-19 22:39:04 +0100 |
commit | 04bdd7af72aa9ab5aa81e38ca85d3f40e76f16d4 (patch) | |
tree | 583e217b7f1b678e8911fcc897529ff8d6faeec2 /mpvcore/player | |
parent | 50837129b231ae9a811abac2767af5fa6ced621b (diff) | |
download | mpv-04bdd7af72aa9ab5aa81e38ca85d3f40e76f16d4.tar.bz2 mpv-04bdd7af72aa9ab5aa81e38ca85d3f40e76f16d4.tar.xz |
timeline: add edl:// URIs
Questionable change from user perspective, but internally needed to
implement the next commit. Also useful for testing timeline stuff.
Diffstat (limited to 'mpvcore/player')
-rw-r--r-- | mpvcore/player/timeline/tl_edl.c | 4 | ||||
-rw-r--r-- | mpvcore/player/timeline/tl_mpv_edl.c | 5 |
2 files changed, 6 insertions, 3 deletions
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); } |