1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 01:22:30 +00:00

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.
This commit is contained in:
Kacper Michajłow 2023-08-31 23:51:10 +02:00 committed by Dudemanguy
parent fef4481bfe
commit e234fc0ee5

View File

@ -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