From a4ecf72c08d5e0946e0a09bc37666c89513e4262 Mon Sep 17 00:00:00 2001 From: Ewald Snel Date: Sun, 9 Jun 2002 08:30:58 +0000 Subject: Fix frame height not divisible by 4 for Xv driver CVS patchset: 2042 CVS date: 2002/06/09 08:30:58 --- src/video_out/video_out_xv.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 48eca1bd8..d6e9b1e8d 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.117 2002/06/04 08:36:52 heikos Exp $ + * $Id: video_out_xv.c,v 1.118 2002/06/09 08:30:58 esnel Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -446,7 +446,6 @@ static void xv_update_frame_format (vo_driver_t *this_gen, if ((frame->width != width) || (frame->height != height) || (frame->format != format)) { - int height_rounded; /* printf ("video_out_xv: updating frame to %d x %d (ratio=%d, format=%08x)\n",width,height,ratio_code,format); */ @@ -463,14 +462,9 @@ static void xv_update_frame_format (vo_driver_t *this_gen, frame->image = create_ximage (this, &frame->shminfo, width, height, format); - if (height % 4) - height_rounded = height + (4 - (height % 4)); - else - height_rounded = height; - - frame->vo_frame.base[0] = frame->image->data; - frame->vo_frame.base[1] = frame->image->data + width * height_rounded * 5 / 4; - frame->vo_frame.base[2] = frame->image->data + width * height_rounded; + frame->vo_frame.base[0] = frame->image->data + frame->image->offsets[0]; + frame->vo_frame.base[1] = frame->image->data + frame->image->offsets[2]; + frame->vo_frame.base[2] = frame->image->data + frame->image->offsets[1]; frame->width = width; frame->height = height; -- cgit v1.2.3