diff options
author | wm4 <wm4@mplayer2.org> | 2011-12-31 19:01:20 +0100 |
---|---|---|
committer | wm4 <wm4@mplayer2.org> | 2012-03-17 21:06:30 +0100 |
commit | 8bfac760922a709f370558cce6ca2ae53ee0be5b (patch) | |
tree | c16ec0800e4e4a3e91b7c95605bcac54f7fbce2e | |
parent | 0e92bbef2f11f28ba96a50d01f98fba74ebc4891 (diff) | |
download | mpv-8bfac760922a709f370558cce6ca2ae53ee0be5b.tar.bz2 mpv-8bfac760922a709f370558cce6ca2ae53ee0be5b.tar.xz |
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.
-rw-r--r-- | libvo/vo_direct3d.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |