summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-01-11 12:10:19 +0100
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commit6efcde06e31be4db0b2d9e3958bafffcdaa0a42e (patch)
treebb592c9e8c808274487750feb04263aed57ecc76
parent19422f0eea7fbc4c9c02ac16d832a667f4a1be7c (diff)
downloadmpv-6efcde06e31be4db0b2d9e3958bafffcdaa0a42e.tar.bz2
mpv-6efcde06e31be4db0b2d9e3958bafffcdaa0a42e.tar.xz
ytdl_hook: use no_clip for separate audio streams
I noticed that some ytdl streams have a start time other than 0. There's currently no mechanism inside of the EDL stuff that determines this start time correctly, so it can happen that if the start time is high, demux_timeline.c tries to clip off the entire video and audio, resulting in failure of playback. As a counter measure, use the no_clip header, which entirely disables clipping against time ranges in demux_timeline.c. (It's basically a hack.)
-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 82381b88c3..df0a0195f8 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -331,7 +331,7 @@ local function add_single_video(json)
if #streams > 1 then
-- merge them via EDL
for i = 1, #streams do
- streams[i] = edl_escape(streams[i])
+ streams[i] = "!no_clip;" .. edl_escape(streams[i])
end
streamurl = "edl://!no_chapters;" ..
table.concat(streams, ";!new_stream;") .. ";"