vo_dmabuf_wayland: don't try to get pts without frame->current

Fixes a segfault with --force-window=immediate.
This commit is contained in:
Dudemanguy 2023-07-12 16:46:31 -05:00
parent f3c1dcf7a1
commit b57cf110c9
1 changed files with 2 additions and 1 deletions

View File

@ -531,7 +531,7 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
struct vo_wayland_state *wl = vo->wl;
struct buffer *buf;
struct osd_buffer *osd_buf;
double pts = frame->current->pts;
double pts;
if (!vo_wayland_check_visible(vo) || !frame->current)
return;
@ -539,6 +539,7 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
if (p->destroy_buffers)
destroy_buffers(vo);
pts = frame->current->pts;
struct mp_image *src = mp_image_new_ref(frame->current);
buf = buffer_get(vo, src);
osd_buf = osd_buffer_get(vo);