summaryrefslogtreecommitdiffstats
path: root/video/out/vo_wayland.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-18 20:04:59 +0200
committerwm4 <wm4@nowhere>2014-06-18 20:04:59 +0200
commit9accfe04265785b68ebfc50e0fb4dd3ebb62d4c2 (patch)
tree51b48de261874cd48e4e29b0a459eebb9b718cae /video/out/vo_wayland.c
parent86e5f15592d2c732c03735f4aa7d6361ee0f20dd (diff)
downloadmpv-9accfe04265785b68ebfc50e0fb4dd3ebb62d4c2.tar.bz2
mpv-9accfe04265785b68ebfc50e0fb4dd3ebb62d4c2.tar.xz
video/out: fix redrawing with no video frame for some VOs
With the change to merge osd drawing into video frame drawing, some bogus logic got in: they skipped drawing the OSD if no video frame is available. This broke --no-video --force-window mode.
Diffstat (limited to 'video/out/vo_wayland.c')
-rw-r--r--video/out/vo_wayland.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/video/out/vo_wayland.c b/video/out/vo_wayland.c
index be51ec55de..2e98e670cd 100644
--- a/video/out/vo_wayland.c
+++ b/video/out/vo_wayland.c
@@ -474,9 +474,6 @@ static struct buffer * buffer_pool_get_no(struct buffer_pool *pool, uint32_t no)
static bool redraw_frame(struct priv *p)
{
- if (!p->original_image)
- return false;
-
draw_image(p->vo, p->original_image);
return true;
}
@@ -670,6 +667,12 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
buffer_resize(&p->video_bufpool, buf, p->dst_w, p->dst_h);
}
+ if (!mpi) {
+ // TODO: clear screen
+ draw_osd(vo);
+ return;
+ }
+
struct mp_image src = *mpi;
struct mp_rect src_rc = p->src;
src_rc.x0 = MP_ALIGN_DOWN(src_rc.x0, src.fmt.align_x);