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:
parent
0e92bbef2f
commit
8bfac76092
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user