# HG changeset patch # User reimar # Date 1178960767 0 # Node ID dc2c6e97119cb8ef64b12cf03c2da4912306f60d # Parent 907b3bb595c700ffedd40509041f449ccea72779 Simplify -flip handling on vo_x11.c diff -r 907b3bb595c7 -r dc2c6e97119c libvo/vo_x11.c --- 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;