mirror of https://github.com/mpv-player/mpv
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:
parent
296d40dc6f
commit
94c189dae7
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue