summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-07-12 16:46:31 -0500
committerDudemanguy <random342@airmail.cc>2023-07-12 16:59:47 -0500
commitb57cf110c9c1bdea826455093ccc767be5739ce8 (patch)
treeeaa03aeecf6d2b8349391198a970d8c2d052cfdc /video
parentf3c1dcf7a13c61deb6bcdeeaec9f82163ab31177 (diff)
downloadmpv-b57cf110c9c1bdea826455093ccc767be5739ce8.tar.bz2
mpv-b57cf110c9c1bdea826455093ccc767be5739ce8.tar.xz
vo_dmabuf_wayland: don't try to get pts without frame->current
Fixes a segfault with --force-window=immediate.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_dmabuf_wayland.c3
1 files changed, 2 insertions, 1 deletions
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);