mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-28 14:29:25 +08: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:
+1
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user