diff --git a/script-opts/blur_edges.conf b/script-opts/blur_edges.conf index b69ce99..7daa069 100644 --- a/script-opts/blur_edges.conf +++ b/script-opts/blur_edges.conf @@ -24,3 +24,7 @@ watch_later_fix=no # only apply the blur effect when mpv is set to fullscreen only_fullscreen=yes + +# This script will likely not work with hardware decoding, therefore disable it +# when activating the blur +disable_hwdec=yes diff --git a/scripts/blur-edges.lua b/scripts/blur-edges.lua index 390e738..e77eb39 100644 --- a/scripts/blur-edges.lua +++ b/scripts/blur-edges.lua @@ -9,6 +9,7 @@ local opts = { reapply_delay = 0.5, watch_later_fix = false, only_fullscreen = true, + disable_hwdec = true, } options.read_options(opts) @@ -127,7 +128,14 @@ function toggle() active = false unset_blur() mp.unobserve_property(reset_blur) + if opts.disable_hwdec then + mp.set_property("hwdec", orig_value_hwdec) + end else + if opts.disable_hwdec then + orig_value_hwdec = mp.get_property("hwdec") + mp.set_property("hwdec", "no") + end active = true set_blur() local properties = { "osd-width", "osd-height", "path", "fullscreen" }