diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-02-26 21:41:41 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-02-26 21:41:41 +0000 |
commit | c569efed6ca29ee6051af56d568787a38dd21326 (patch) | |
tree | d2007325ae4db9cffb6b27c8dbfe290f376ff123 /src | |
parent | b6af16bb40a01d4e12d04805b089f98a303ac528 (diff) | |
download | xine-lib-c569efed6ca29ee6051af56d568787a38dd21326.tar.gz xine-lib-c569efed6ca29ee6051af56d568787a38dd21326.tar.bz2 |
allocate frame data memory depending on colorspace format
CVS patchset: 1521
CVS date: 2002/02/26 21:41:41
Diffstat (limited to 'src')
-rw-r--r-- | src/video_out/video_out_xv.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 84bcb8502..a0550e4af 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.96 2002/02/26 00:55:34 f1rmb Exp $ + * $Id: video_out_xv.c,v 1.97 2002/02/26 21:41:41 guenter Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -384,13 +384,20 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, char *data; - /* This cause segfault with remote display */ - /* data = malloc (width * height * 3/2); */ - data = malloc (width * height * 2); + switch (format) { + case IMGFMT_YV12: + data = malloc (width * height * 3/2); + break; + case IMGFMT_YUY2: + data = malloc (width * height * 2); + break; + default: + fprintf (stderr, "create_ximage: unknown format %08x\n",format); + exit (1); + } + image = XvCreateImage (this->display, this->xv_port, xv_format, data, width, height); - - } return image; } |