summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2018-02-11 13:16:45 +0000
committerKevin Mitchell <kevmitch@gmail.com>2018-02-11 23:25:05 -0800
commit268431c8580ef7d6f28690b1c4019be5d25142ed (patch)
treeea8ab91131e42a529ad22a933f895b0a8ab74f2c
parent40f29a33df95370c7e4f79ccb2c8bed5804f8aaf (diff)
downloadmpv-268431c8580ef7d6f28690b1c4019be5d25142ed.tar.bz2
mpv-268431c8580ef7d6f28690b1c4019be5d25142ed.tar.xz
ytdl_hook: use fallback if there's no demuxer-lavf-list prop
This is important if backporting by grabbing the latest version of the script without backporting the commit that added the property: 828bd2963cd10a851e0a977809687aed4d377dc3
-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 7c537c206c..7c1867deb8 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -215,8 +215,8 @@ local function edl_track_joined(fragments, protocol, is_live, base)
end
local function has_native_dash_demuxer()
- local demuxers = mp.get_property_native("demuxer-lavf-list")
- for _,v in ipairs(demuxers) do
+ local demuxers = mp.get_property_native("demuxer-lavf-list", {})
+ for _, v in ipairs(demuxers) do
if v == "dash" then
return true
end
@@ -230,7 +230,7 @@ local function valid_manifest(json)
return false
end
local proto = reqfmt["protocol"] or json["protocol"] or ""
- return (has_native_dash_demuxer() and proto == "http_dash_segments") or
+ return (proto == "http_dash_segments" and has_native_dash_demuxer()) or
proto:find("^m3u8")
end