summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorChristoph Heinrich <christoph.heinrich@student.tugraz.at>2023-03-03 00:45:45 +0100
committerDudemanguy <random342@airmail.cc>2023-03-03 23:02:13 +0000
commit94c189dae76ba280d9883b16346c3dfb9720687e (patch)
treecf081e93c643631c76940c1ae0d7f60bb008c6a0 /player
parent296d40dc6f38401085d005bb4627f8afff46b041 (diff)
downloadmpv-94c189dae76ba280d9883b16346c3dfb9720687e.tar.bz2
mpv-94c189dae76ba280d9883b16346c3dfb9720687e.tar.xz
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.
Diffstat (limited to 'player')
-rw-r--r--player/lua/ytdl_hook.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 27e5f4544b..9e50b3a80b 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -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