diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-05-12 09:06:07 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-05-12 09:06:07 +0000 |
commit | b05e6e17ef7439b2af6455990e680157f8ae4287 (patch) | |
tree | 23bdd3881c9411925207ef25940a47f87a685611 | |
parent | fba11c94ffcd4f2b76ad777a02aaab3941e95817 (diff) | |
download | mpv-b05e6e17ef7439b2af6455990e680157f8ae4287.tar.bz2 mpv-b05e6e17ef7439b2af6455990e680157f8ae4287.tar.xz |
Simplify -flip handling on vo_x11.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23302 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libvo/vo_x11.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 523d2dd0b3..5e1ec7fddf 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -650,14 +650,12 @@ static int draw_slice(uint8_t * src[], int stride[], int w, int h, dstStride[1] = dstStride[2] = 0; dst[1] = dst[2] = NULL; + dstStride[0] = image_width * ((bpp + 7) / 8); + dst[0] = ImageData; if (Flip_Flag) { - dstStride[0] = -image_width * ((bpp + 7) / 8); - dst[0] = ImageData - (long)dstStride[0] * (image_height - 1); - } else - { - dstStride[0] = image_width * ((bpp + 7) / 8); - dst[0] = ImageData; + dst[0] += dstStride[0] * (image_height - 1); + dstStride[0] = -dstStride[0]; } sws_scale_ordered(swsContext, src, stride, y, h, dst, dstStride); return 0; |