From 268431c8580ef7d6f28690b1c4019be5d25142ed Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Sun, 11 Feb 2018 13:16:45 +0000 Subject: [PATCH] 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 --- player/lua/ytdl_hook.lua | 6 +++--- 1 file 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