ytdl_hook: init fragment requires other fragments

With dash the first fragment was always considered an init fragment if
there wasn't a duration. However that only makes sense when there are
also other fragments, so check if there are other fragments in addition
to the lack of a duration.
This commit is contained in:
Christoph Heinrich 2023-03-03 00:45:45 +01:00 committed by Dudemanguy
parent 296d40dc6f
commit 94c189dae7
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ local function edl_track_joined(fragments, protocol, is_live, base)
local args = "" local args = ""
-- assume MP4 DASH initialization segment -- assume MP4 DASH initialization segment
if not fragments[1].duration then if not fragments[1].duration and #fragments > 1 then
msg.debug("Using init segment") msg.debug("Using init segment")
args = args .. ",init=" .. edl_escape(join_url(base, fragments[1])) args = args .. ",init=" .. edl_escape(join_url(base, fragments[1]))
offset = 2 offset = 2