From a09396ee609af71f49f70521320e87989577b577 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 11 Jan 2019 13:52:29 +0100 Subject: demux_edl, cue, mkv: clean up timeline stuff slightly Remove the singly linked list hack, replace it with a slightly more proper data structure. This probably gets rid of a few minor bugs along the way, caused by the awkward nonsensical sharing/duplication of some fields. Another change (because I'm touching everything related to timeline anyway) is that I'm removing the special semantics for parts[num_parts]. This is now strictly out of bounds, and instead of using the start time of the next/beyond-last part, there is an end time field now. Unfortunately, this also requires touching the code for cue and mkv ordered chapters. From some superficial testing, they still seem to mostly work. One observable change is that the "no_chapters" header is per-stream now, which is arguably more correct, and getting the old behavior would require adding code to handle it as special-case, so just adjust ytdl_hook.lua to the new behavior. --- player/lua/ytdl_hook.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/lua') diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index df0a0195f8..ab29610f0c 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -331,9 +331,9 @@ local function add_single_video(json) if #streams > 1 then -- merge them via EDL for i = 1, #streams do - streams[i] = "!no_clip;" .. edl_escape(streams[i]) + streams[i] = "!no_clip;!no_chapters;" .. edl_escape(streams[i]) end - streamurl = "edl://!no_chapters;" .. + streamurl = "edl://" .. table.concat(streams, ";!new_stream;") .. ";" else streamurl = streams[1] -- cgit v1.2.3