From b57cf110c9c1bdea826455093ccc767be5739ce8 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 12 Jul 2023 16:46:31 -0500 Subject: vo_dmabuf_wayland: don't try to get pts without frame->current Fixes a segfault with --force-window=immediate. --- video/out/vo_dmabuf_wayland.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out') diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c index 62fdad7499..e4c3bf3768 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -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); -- cgit v1.2.3