summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xv.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-27 18:06:09 +0200
committerwm4 <wm4@nowhere>2012-11-01 02:07:45 +0100
commit9ba52ea6efd41db9dbd08311380f7fa633e22aa2 (patch)
tree698757630c88e96f323bc66461045234505ace91 /libvo/vo_xv.c
parentd9839fe8623c855b6b335df3a5b9783e3ed22266 (diff)
downloadmpv-9ba52ea6efd41db9dbd08311380f7fa633e22aa2.tar.bz2
mpv-9ba52ea6efd41db9dbd08311380f7fa633e22aa2.tar.xz
screenshot, draw_bmp: use colorspace passed with mp_image
Remove the explicit struct mp_csp_details parameters from all related functions, and use mp_image.colorspace/levels instead.
Diffstat (limited to 'libvo/vo_xv.c')
-rw-r--r--libvo/vo_xv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 390c1753b6..82469e491f 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -309,6 +309,10 @@ static struct mp_image get_xv_buffer(struct vo *vo, int buf_index)
img.stride[n] = xv_image->pitches[sn];
}
+ struct mp_csp_details csp = {0};
+ vo_control(vo, VOCTRL_GET_YUV_COLORSPACE, &csp);
+ mp_image_set_colorspace_details(&img, &csp);
+
return img;
}
@@ -336,9 +340,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
struct mp_image img = get_xv_buffer(vo, ctx->current_buf);
- struct mp_csp_details csp = {0};
- vo_control(vo, VOCTRL_GET_YUV_COLORSPACE, &csp);
-
struct vo_rect *src = &ctx->src_rect;
struct vo_rect *dst = &ctx->dst_rect;
double xvpar = (double)dst->width / dst->height * src->height / src->width;
@@ -350,7 +351,7 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
.video_par = vo->aspdat.par,
};
- if (osd_draw_on_image(osd, res, osd->vo_pts, 0, &img, &csp))
+ if (osd_draw_on_image(osd, res, osd->vo_pts, 0, &img))
ctx->unchanged_image = false;
}