1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 01:16:45 +00:00

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.
This commit is contained in:
wm4 2011-12-31 19:01:20 +01:00
parent 0e92bbef2f
commit 8bfac76092

View File

@ -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,