summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-08-31 23:51:10 +0200
committerDudemanguy <random342@airmail.cc>2023-09-08 02:27:08 +0000
commite234fc0ee5cd6872717fdf3a20c6fc62cf3a747a (patch)
tree089901b2440ea703804f75e5962761d850364a6f /TOOLS
parentfef4481bfec74ea20e3c78cedd657977cac16434 (diff)
downloadmpv-e234fc0ee5cd6872717fdf3a20c6fc62cf3a747a.tar.bz2
mpv-e234fc0ee5cd6872717fdf3a20c6fc62cf3a747a.tar.xz
autocrop.lua: detect if crop is enabled based on prop
Now we can have full frame crop, so to avoid checking that, just check property.
Diffstat (limited to 'TOOLS')
-rw-r--r--TOOLS/lua/autocrop.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/TOOLS/lua/autocrop.lua b/TOOLS/lua/autocrop.lua
index 5e7a566900..62aee7c89a 100644
--- a/TOOLS/lua/autocrop.lua
+++ b/TOOLS/lua/autocrop.lua
@@ -124,9 +124,11 @@ end
function remove_filter(label)
if options.use_vo_crop and label == labels.crop then
- local ro = mp.get_property_native("video-out-params")
- mp.command(string.format("%s set video-crop 0", command_prefix))
- return ro and ro["crop-w"] and ro["crop-w"] > 0
+ if mp.get_property('video-crop') ~= '0x0' then
+ mp.command(string.format("%s set video-crop 0", command_prefix))
+ return true
+ end
+ return false
end
if is_filter_present(label) then