summaryrefslogtreecommitdiffstats
path: root/mpvcore/player/timeline/tl_edl.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-19 22:23:41 +0100
committerwm4 <wm4@nowhere>2013-11-19 22:38:27 +0100
commit50837129b231ae9a811abac2767af5fa6ced621b (patch)
tree6989334045414d4dc93d46f7c12ed1f2118dd169 /mpvcore/player/timeline/tl_edl.c
parent469e488308bcb215f1038cc3e4d9399361599532 (diff)
downloadmpv-50837129b231ae9a811abac2767af5fa6ced621b.tar.bz2
mpv-50837129b231ae9a811abac2767af5fa6ced621b.tar.xz
timeline: add new EDL format
Edit Decision Lists (EDL) allow combining parts from multiple source files into one virtual file. MPlayer had an EDL format (which sucked), which mplayer2 tried to improve with its own format (which sucked). As logic demands, mpv introduces its very own format (which sucks). The new format should actually be much simpler and easier to use, and its implementation is simpler and smaller too.
Diffstat (limited to 'mpvcore/player/timeline/tl_edl.c')
-rw-r--r--mpvcore/player/timeline/tl_edl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mpvcore/player/timeline/tl_edl.c b/mpvcore/player/timeline/tl_edl.c
index 69e2402149..b4715e5a1f 100644
--- a/mpvcore/player/timeline/tl_edl.c
+++ b/mpvcore/player/timeline/tl_edl.c
@@ -70,6 +70,10 @@ 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")) {
+ build_mpv_edl_timeline(mpctx);
+ goto out;
+ }
if (!linec || !bstr_startswith(lines[0], header)) {
mp_msg(MSGT_CPLAYER, MSGL_ERR, "EDL: Bad EDL header!\n");
goto out;