summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-26 15:46:58 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-26 15:46:58 +0000
commit804eff01755f3707f1f43519b181f251bc9dd9c0 (patch)
tree197cf133c44d549828631dfde7d8b47c4a587f83 /libvo
parent6f408b47d7f592495c9e8d5af96b6a813a5778aa (diff)
downloadmpv-804eff01755f3707f1f43519b181f251bc9dd9c0.tar.bz2
mpv-804eff01755f3707f1f43519b181f251bc9dd9c0.tar.xz
fixed i420 handling
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4352 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_xv.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 9f7fd04ae1..60a0cd2889 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -566,8 +566,16 @@ static uint32_t draw_frame(uint8_t *src[])
// 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;
}