summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--osd.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/osd.lua b/osd.lua
index 7f44f60..f9d4078 100644
--- a/osd.lua
+++ b/osd.lua
@@ -278,9 +278,9 @@ function mt:set_img(path, menu_res)
-- line is. if it were possible to place images *under* text, maybe
-- we'd allow overlap, but mpv currently hard-codes this order.
local min_h = math.floor(3 * fs)
- local max_h = math.floor(math.min(
+ local max_h = math.floor(math.max(min_h, math.min(
self.height - 2*padding,
- (self.width - start - 2*padding) * 3/2))
+ (self.width - start - 2*padding) * 3/2)))
local max_w = math.floor(max_h * 2/3)
local top = math.floor(padding)
local right = math.floor(self.width - padding)