Mercurial > mplayer.hg
changeset 23284:dc2c6e97119c
Simplify -flip handling on vo_x11.c
author | reimar |
---|---|
date | Sat, 12 May 2007 09:06:07 +0000 |
parents | 907b3bb595c7 |
children | 06358e260e6b |
files | libvo/vo_x11.c |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_x11.c Sat May 12 09:03:50 2007 +0000 +++ b/libvo/vo_x11.c Sat May 12 09:06:07 2007 +0000 @@ -650,14 +650,12 @@ 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;