summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-21 12:06:18 +0100
committerwm4 <wm4@nowhere>2020-02-21 12:06:18 +0100
commitdaa3c11e1bc4eb2d88934250f191a807646bc548 (patch)
tree69e96d53c5a4a73d841684500c4821a34fd5d281
parent9f5b9011d6cf917c283b0576af4172b04a21008c (diff)
downloadmpv-daa3c11e1bc4eb2d88934250f191a807646bc548.tar.bz2
mpv-daa3c11e1bc4eb2d88934250f191a807646bc548.tar.xz
ytdl_hook: add length parameter to delay-loaded tracks only once
This was done for each media type, so muxed tracks had it twice, which logged a dumb warning. Move it out of the per-media type loop.
-rw-r--r--player/lua/ytdl_hook.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 2369c9640a..5cf64849b8 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -416,10 +416,10 @@ local function formats_to_edl(json, formats, use_all_formats)
end
hdr[#hdr + 1] = "!track_meta,title=" ..
edl_escape(title) .. ",byterate=" .. byterate
+ end
- if duration > 0 then
- params = params .. ",length=" .. duration
- end
+ if duration > 0 then
+ params = params .. ",length=" .. duration
end
end