mirror of https://github.com/mpv-player/mpv
vo_wlshm: bail out of resize if width/height is 0
It can happen during initialization and of course nothing good will happen if we let this go through (i.e. segfault). Return and wait for geometry to finish setting up in the wayland stuff before doing the initial resize.
This commit is contained in:
parent
0242055564
commit
ab3002851e
|
@ -184,6 +184,10 @@ static int resize(struct vo *vo)
|
|||
struct vo_wayland_state *wl = vo->wl;
|
||||
const int32_t width = mp_rect_w(wl->geometry);
|
||||
const int32_t height = mp_rect_h(wl->geometry);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return 1;
|
||||
|
||||
struct buffer *buf;
|
||||
|
||||
vo_wayland_set_opaque_region(wl, false);
|
||||
|
|
Loading…
Reference in New Issue