diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-08-21 19:12:13 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-08-21 19:12:13 +0000 |
commit | 193e97432651c64f17cda9fe8e36c36082fe7b39 (patch) | |
tree | b4bab6123f1de59cf330beddf04f942f7c020c9b /libmpcodecs | |
parent | c473238dc8ff374a0f69531c605e203005b43792 (diff) |
allocating large enough buffer, fixes green stuff on top for encoding of height %16 != 0 videos
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7053 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_expand.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c index dc9e08ad33..8f293923fd 100644 --- a/libmpcodecs/vf_expand.c +++ b/libmpcodecs/vf_expand.c @@ -18,6 +18,8 @@ #include "../libvo/osd.h" #endif +#define MAX(a,b) ((a) > (b) ? (a) : (b)) + struct vf_priv_s { int exp_w,exp_h; int exp_x,exp_y; @@ -194,7 +196,9 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){ (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH)) ){ // try full DR ! vf->priv->dmpi=vf_get_image(vf->next,mpi->imgfmt, - mpi->type, mpi->flags, vf->priv->exp_w, vf->priv->exp_h); + mpi->type, mpi->flags, + MAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), + MAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y)); // set up mpi as a cropped-down image of dmpi: if(mpi->flags&MP_IMGFLAG_PLANAR){ mpi->planes[0]=vf->priv->dmpi->planes[0]+ |