summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-21 16:23:43 +0100
committerwm4 <wm4@nowhere>2020-02-21 16:23:43 +0100
commitc1f7b0c5359ff06e823f2d7cb00846b2b9f3c590 (patch)
treef9ab8023f225ad0fab233d8d9336cf19a55a9181
parent605e1fb76667802408412128393ceecb4a932180 (diff)
downloadmpv-c1f7b0c5359ff06e823f2d7cb00846b2b9f3c590.tar.bz2
mpv-c1f7b0c5359ff06e823f2d7cb00846b2b9f3c590.tar.xz
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.
-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 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.