better fix for i420/iyuv as suggested by arpi

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5967 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rfelker 2002-05-04 05:46:36 +00:00
parent ddbfc3b287
commit 984b5895f4
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
if(mpi->bpp == 12 && mpi->flags&MP_IMGFLAG_YUV) {
// Support for some common Planar YUV formats
int cb=2, cr=1;
if (sh->format == IMGFMT_IYUV || sh->format == IMGFMT_I420) {
if(mpi->flags&MP_IMGFLAG_SWAPPED) {
cb=1; cr=2;
}
mpi->planes[cb]=data+mpi->width*mpi->height;