diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-27 21:49:19 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-27 21:49:19 +0000 |
commit | 497f2396a43b5e6a86db49b8b997cff06fc6338f (patch) | |
tree | 37b1ff41ac6a17deba23386680ebd7ea4661aec2 /libvo | |
parent | 5733fc571b9b1a58b878021e410997a58e42ad7f (diff) |
10l to nick - ACCEPT_WIDTH fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5374 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vosub_vidix.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c index 0dbb5086ca..8ee84ecba9 100644 --- a/libvo/vosub_vidix.c +++ b/libvo/vosub_vidix.c @@ -636,18 +636,28 @@ static uint32_t vidix_get_image(mp_image_t *mpi) if((is_422_planes_eq || (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH)) && !forced_fourcc && !(vidix_play.flags & VID_PLAY_INTERLEAVED_UV))) { + if(mpi->flags&MP_IMGFLAG_ACCEPT_WIDTH){ + // check if only width is enough to represent strides: + if(mpi->flags&MP_IMGFLAG_PLANAR){ + if((dstrides.y>>1)!=dstrides.v || dstrides.v!=dstrides.u) return VO_FALSE; + } else { + if(dstrides.y % (mpi->bpp/8)) return VO_FALSE; + } + } mpi->planes[0]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.y; - mpi->stride[0]=dstrides.y; + mpi->width=mpi->stride[0]=dstrides.y; if(mpi->flags&MP_IMGFLAG_PLANAR) { mpi->planes[2]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.v; mpi->stride[2]=dstrides.v; mpi->planes[1]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.u; mpi->stride[1]=dstrides.u; - } + } else + mpi->width/=mpi->bpp/8; mpi->flags|=MP_IMGFLAG_DIRECT; + return VO_TRUE; } - return VO_TRUE; + return VO_FALSE; } uint32_t vidix_control(uint32_t request, void *data, ...) |