From e234fc0ee5cd6872717fdf3a20c6fc62cf3a747a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Thu, 31 Aug 2023 23:51:10 +0200 Subject: [PATCH] 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. --- TOOLS/lua/autocrop.lua | 8 +++++--- 1 file 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