From 8bfac760922a709f370558cce6ca2ae53ee0be5b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 31 Dec 2011 19:01:20 +0100 Subject: vo_direct3d: fix bug in screenshot code with some pixel formats A typo caused the height of the image copy to be incorrectly calculated with some less common pixel formats, when X chroma shift != Y chroma shift. --- libvo/vo_direct3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvo/vo_direct3d.c b/libvo/vo_direct3d.c index b8237ef58b..b5b23415ce 100644 --- a/libvo/vo_direct3d.c +++ b/libvo/vo_direct3d.c @@ -1846,7 +1846,7 @@ static bool get_screenshot_from_texture(d3d_priv *priv, mp_image_t *image) struct texplane *plane = &priv->planes[n]; int width = priv->src_width >> plane->shift_x; - int height = priv->src_height >> plane->shift_x; + int height = priv->src_height >> plane->shift_y; memcpy_pic(image->planes[n], plane->locked_rect.pBits, width * plane->bytes_per_pixel, height, -- cgit v1.2.3