Skip to content

Commit

Permalink
ytdl_hook: init fragment requires other fragments
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
christoph-heinrich authored and Dudemanguy committed Mar 3, 2023
1 parent 296d40d commit 94c189d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion player/lua/ytdl_hook.lua
Expand Up @@ -297,7 +297,7 @@ local function edl_track_joined(fragments, protocol, is_live, base)
local args = ""

-- 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")
args = args .. ",init=" .. edl_escape(join_url(base, fragments[1]))
offset = 2
Expand Down

0 comments on commit 94c189d

Please sign in to comment.