# HG changeset patch # User alex # Date 1012060018 0 # Node ID aac822b8a630805df4a23731559c663fb0d7e7e7 # Parent 70ac7ab2a982e8c4386ede9d713a4531e600ebea fixed i420 handling diff -r 70ac7ab2a982 -r aac822b8a630 libvo/vo_xv.c --- a/libvo/vo_xv.c Sat Jan 26 15:43:31 2002 +0000 +++ b/libvo/vo_xv.c Sat Jan 26 15:46:58 2002 +0000 @@ -566,8 +566,16 @@ // YV12 planar memcpy(xvimage[current_buf]->data,src[0],image_width*image_height); - memcpy(xvimage[current_buf]->data+image_width*image_height,src[2],image_width*image_height/4); - memcpy(xvimage[current_buf]->data+image_width*image_height*5/4,src[1],image_width*image_height/4); + if (xv_format == IMGFMT_YV12) + { + memcpy(xvimage[current_buf]->data+image_width*image_height,src[2],image_width*image_height/4); + memcpy(xvimage[current_buf]->data+image_width*image_height*5/4,src[1],image_width*image_height/4); + } + else + { + memcpy(xvimage[current_buf]->data+image_width*image_height,src[1],image_width*image_height/4); + memcpy(xvimage[current_buf]->data+image_width*image_height*5/4,src[2],image_width*image_height/4); + } break; }