summaryrefslogtreecommitdiffstats
path: root/video/out/vo_direct3d.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-21 23:43:54 +0100
committerwm4 <wm4@nowhere>2014-01-22 00:35:52 +0100
commit4de73fd5c18b982d0a89e2381fcdb3c1e3fea4e3 (patch)
tree70638dee2c0ec0584bc3b859e2ecd41d7947524b /video/out/vo_direct3d.c
parent302e8ff464663522234cfe5b182b9d84193b1981 (diff)
downloadmpv-4de73fd5c18b982d0a89e2381fcdb3c1e3fea4e3.tar.bz2
mpv-4de73fd5c18b982d0a89e2381fcdb3c1e3fea4e3.tar.xz
video/out: don't access aspdat in VOs
vo->aspdat is basically an outdated version of vo->params, plus some weirdness. Get rid of it, which will allow further cleanups and which will make multithreading easier (less state to care about). Also, simplify some VO code by using mp_image_set_attributes() instead of caring about display size, colorspace, etc. manually. Add the function osd_res_from_image_params(), which is often needed in the case OSD renders into an image.
Diffstat (limited to 'video/out/vo_direct3d.c')
-rw-r--r--video/out/vo_direct3d.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c
index 10539d4f18..eae04eecb8 100644
--- a/video/out/vo_direct3d.c
+++ b/video/out/vo_direct3d.c
@@ -1432,15 +1432,15 @@ static mp_image_t *get_screenshot(d3d_priv *priv)
if (!priv->have_image)
return NULL;
+ if (!priv->vo->params)
+ return NULL;
+
struct mp_image buffer;
if (!get_video_buffer(priv, &buffer))
return NULL;
struct mp_image *image = mp_image_new_copy(&buffer);
- mp_image_set_display_size(image, priv->vo->aspdat.prew,
- priv->vo->aspdat.preh);
-
- mp_image_set_colorspace_details(image, &priv->colorspace);
+ mp_image_set_attributes(image, priv->vo->params);
d3d_unlock_video_objects(priv);
return image;