From 34b3ccefa173cc0f107f4c099434321a0ac4eda3 Mon Sep 17 00:00:00 2001 From: 0xACE <0xACE@users.noreply.github.com> Date: Fri, 17 Jan 2020 04:09:43 +0000 Subject: [PATCH] fix set_property aid cannot be set to nil If you attempt to set_property("aid", nil) the script will throw an error. --- speed-transition.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speed-transition.lua b/speed-transition.lua index d820e6f..0dbf7ed 100644 --- a/speed-transition.lua +++ b/speed-transition.lua @@ -23,7 +23,7 @@ function restore_normalspeed() if mp.get_property_native("video-sync") == "desync" then mp.set_property("video-sync", "audio") end - if aid~=mp.get_property("aid") then mp.set_property("aid", aid) end + if (aid~=nil and aid~=mp.get_property("aid")) then mp.set_property("aid", aid) end end function check_should_speedup()