summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-12-22 18:07:54 +0100
committerwm4 <wm4@nowhere>2013-01-13 20:04:12 +0100
commit5e8b3e74ec19cfcae51c4d1b3df6a981af2dcd3d (patch)
treecf87c0c8a0b952b65530d4d19de35adf8333c599 /video
parent3d6d549dac2aa06ecd07bb04902f55140661ace3 (diff)
downloadmpv-5e8b3e74ec19cfcae51c4d1b3df6a981af2dcd3d.tar.bz2
mpv-5e8b3e74ec19cfcae51c4d1b3df6a981af2dcd3d.tar.xz
vo_xv: fix OSD redrawing flicker
redraw_frame() copied the image into the currently visible buffer. This resulted in flicker when doing heavy OSD redrawing (like changing the subtitle size to something absurdly large). Use the same logic as draw_image instead.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_xv.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index 7a454e33c4..de1f3a4855 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -388,19 +388,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
osd_draw_on_image(osd, res, osd->vo_pts, 0, &img);
}
-static int redraw_frame(struct vo *vo)
-{
- struct xvctx *ctx = vo->priv;
-
- if (!ctx->original_image)
- return false;
-
- struct mp_image img = get_xv_buffer(vo, ctx->visible_buf);
- mp_image_copy(&img, ctx->original_image);
- ctx->current_buf = ctx->visible_buf;
- return true;
-}
-
static void flip_page(struct vo *vo)
{
struct xvctx *ctx = vo->priv;
@@ -436,6 +423,17 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
mp_image_setrefp(&ctx->original_image, mpi);
}
+static int redraw_frame(struct vo *vo)
+{
+ struct xvctx *ctx = vo->priv;
+
+ if (!ctx->original_image)
+ return false;
+
+ draw_image(vo, ctx->original_image);
+ return true;
+}
+
static int query_format(struct vo *vo, uint32_t format)
{
struct xvctx *ctx = vo->priv;