summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-10 01:09:23 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-10 01:09:23 +0000
commit747cc862f144eef7178ecdf0f7d9a906ad230912 (patch)
treecb0e082b8cb6376cb1c2ed4d860565ebc35dcb1a /libmpcodecs/vf.c
parent630a8f7b1a19790d4d0e0a308e4f9b8fd04f2a5f (diff)
downloadmpv-747cc862f144eef7178ecdf0f7d9a906ad230912.tar.bz2
mpv-747cc862f144eef7178ecdf0f7d9a906ad230912.tar.xz
don't honor stride hints if the next filter(chain) doesn't support stride
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7698 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vf.c')
-rw-r--r--libmpcodecs/vf.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c
index 6be3b4b522..4a2e30e028 100644
--- a/libmpcodecs/vf.c
+++ b/libmpcodecs/vf.c
@@ -187,8 +187,17 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
int align=(mpi->flags&MP_IMGFLAG_PLANAR &&
mpi->flags&MP_IMGFLAG_YUV) ?
(8<<mpi->chroma_x_shift)-1 : 15; // -- maybe FIXME
- mpi->width=w2=((w+align)&(~align));
- mpi->chroma_width=w2>>mpi->chroma_x_shift;
+ w2=((w+align)&(~align));
+ if(mpi->width!=w2){
+ // we have to change width... check if we CAN co it:
+ int flags=vf->query_format(vf,outfmt); // should not fail
+ if(!(flags&3)) mp_msg(MSGT_DECVIDEO,MSGL_WARN,"??? vf_get_image{vf->query_format(outfmt)} failed!\n");
+// printf("query -> 0x%X \n",flags);
+ if(flags&VFCAP_ACCEPT_STRIDE){
+ mpi->width=w2;
+ mpi->chroma_width=w2>>mpi->chroma_x_shift;
+ }
+ }
}
// IF09 - allocate space for 4. plane delta info - unused