Skip to content

Commit

Permalink
chore(frame): add more information to error
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Feb 16, 2024
1 parent f712e2f commit 1d31494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ffmpeg/frame.cr
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class FFmpeg::Frame
bottom = bottom.clamp(0, max_y)
left = left.clamp(0, max_x)
right = right.clamp(0, max_x)
raise "crop is not valid: #{left},#{top} => #{right},#{bottom}" if (left + right) >= max_x || (top + bottom) >= max_y
raise "crop on #{max_x}x#{max_y} is not valid: #{left},#{top} => #{right},#{bottom}" if (left + right) >= max_x || (top + bottom) >= max_y
return self if top.zero? && left.zero? && bottom.zero? && right.zero?

unsafe_crop(top, left, bottom, right)
Expand Down

0 comments on commit 1d31494

Please sign in to comment.