diff options
author | wm4 <wm4@nowhere> | 2014-06-18 20:04:59 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-18 20:04:59 +0200 |
commit | 9accfe04265785b68ebfc50e0fb4dd3ebb62d4c2 (patch) | |
tree | 51b48de261874cd48e4e29b0a459eebb9b718cae /video/out/vo_x11.c | |
parent | 86e5f15592d2c732c03735f4aa7d6361ee0f20dd (diff) | |
download | mpv-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_x11.c')
-rw-r--r-- | video/out/vo_x11.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 53a4fb03f7..63c256c509 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -460,7 +460,7 @@ static void flip_page(struct vo *vo) XSync(vo->x11->display, False); } -// Note: redraw_frame() can call this with NULL. +// Note: REDRAW_FRAME can call this with NULL. static void draw_image(struct vo *vo, mp_image_t *mpi) { struct priv *p = vo->priv; @@ -489,17 +489,6 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) } } -static int redraw_frame(struct vo *vo) -{ - struct priv *p = vo->priv; - - if (!p->original_image) - return false; - - draw_image(vo, p->original_image); - return true; -} - static int query_format(struct vo *vo, uint32_t format) { struct priv *p = vo->priv; @@ -631,7 +620,7 @@ static int control(struct vo *vo, uint32_t request, void *data) resize(vo); return VO_TRUE; case VOCTRL_REDRAW_FRAME: - redraw_frame(vo); + draw_image(vo, p->original_image); return true; case VOCTRL_WINDOW_TO_OSD_COORDS: { // OSD is rendered into the scaled image |