From c1f7b0c5359ff06e823f2d7cb00846b2b9f3c590 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 21 Feb 2020 16:23:43 +0100 Subject: ytdl_hook: fix Lua escapes This was obviously nonsense. In Lua 5.1 this appeared to work correctly, but it really turned "\." into "." (making the pattern accept any character). The proper way is using "%" for escaping. --- 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 3420054dd6..a67a39555e 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -44,9 +44,9 @@ local codec_map = { ["vtt"] = "webvtt", ["opus"] = "opus", ["vp9"] = "vp9", - ["avc1\..*"] = "h264", - ["av01\..*"] = "av1", - ["mp4a\..*"] = "aac", + ["avc1%..*"] = "h264", + ["av01%..*"] = "av1", + ["mp4a%..*"] = "aac", } -- Codec name as reported by youtube-dl mapped to mpv internal codec names. -- cgit v1.2.3