diff options
author | Christoph Heinrich <christoph.heinrich@student.tugraz.at> | 2023-02-10 22:36:25 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-04-05 17:14:43 +0000 |
commit | b7ffe0d16eec8153d9609382997baaf6a29e5e4f (patch) | |
tree | 8cad6f33e59facb690f27442941cb799ada693de | |
parent | 9feeb324eddd9ed73ae667e10275f663d70f7544 (diff) | |
download | mpv-b7ffe0d16eec8153d9609382997baaf6a29e5e4f.tar.bz2 mpv-b7ffe0d16eec8153d9609382997baaf6a29e5e4f.tar.xz |
osc: skip rendering when osd_dimensions are 0
The idle logo could appear on the left side of the window for a split
second after starting.
That is because when osd dimensions can be reported as 0 at the very beginning.
Since the width gets calculated based on a fixed height and the aspect ratio,
which is 0, that results in a width of 0 until the next update.
-rw-r--r-- | player/lua/osc.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index bf3992faa9..f3d4e84fa1 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -2594,6 +2594,9 @@ function tick() -- render idle message msg.trace("idle message") local _, _, display_aspect = mp.get_osd_size() + if display_aspect == 0 then + return + end local display_h = 360 local display_w = display_h * display_aspect -- logo is rendered at 2^(6-1) = 32 times resolution with size 1800x1800 |