diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-06 01:25:04 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-06 01:25:04 +0000 |
commit | 8739c41b0bf923e61baf6b4dbdbd0901f3316d9b (patch) | |
tree | 7b955961cf54fac442365ce90681e3bf94df6429 | |
parent | 2b9d23474d09ab78b87f4b7a42044429fa1f901e (diff) | |
download | xine-lib-8739c41b0bf923e61baf6b4dbdbd0901f3316d9b.tar.gz xine-lib-8739c41b0bf923e61baf6b4dbdbd0901f3316d9b.tar.bz2 |
do not overrun data returned by X server (YUY2 case)
that might fix the segfault with wmv8
CVS patchset: 3432
CVS date: 2002/12/06 01:25:04
-rw-r--r-- | src/video_out/video_out_xv.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index c0cff2042..687d654dc 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.151 2002/11/22 18:06:26 mroi Exp $ + * $Id: video_out_xv.c,v 1.152 2002/12/06 01:25:04 miguelfreitas Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -409,12 +409,18 @@ static void xv_update_frame_format (vo_driver_t *this_gen, frame->image = create_ximage (this, &frame->shminfo, width, height, format); - frame->vo_frame.pitches[0] = frame->image->pitches[0]; - frame->vo_frame.pitches[1] = frame->image->pitches[2]; - frame->vo_frame.pitches[2] = frame->image->pitches[1]; - 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]; + + if( format == XINE_IMGFMT_YUY2 ) { + frame->vo_frame.pitches[0] = frame->image->pitches[0]; + frame->vo_frame.base[0] = frame->image->data + frame->image->offsets[0]; + } else { + frame->vo_frame.pitches[0] = frame->image->pitches[0]; + frame->vo_frame.pitches[1] = frame->image->pitches[2]; + frame->vo_frame.pitches[2] = frame->image->pitches[1]; + 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; |