Skip to content

Commit

Permalink
autocrop.lua: detect if crop is enabled based on prop
Browse files Browse the repository at this point in the history
Now we can have full frame crop, so to avoid checking that, just check
property.
  • Loading branch information
kasper93 authored and Dudemanguy committed Sep 8, 2023
1 parent fef4481 commit e234fc0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TOOLS/lua/autocrop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e234fc0

Please sign in to comment.