# HG changeset patch # User michael # Date 1029957133 0 # Node ID f3b2f31332fc9f179f9d0bfda85465126a926233 # Parent d03fad6123a3297beb74344618c496f7c26c3fd3 allocating large enough buffer, fixes green stuff on top for encoding of height %16 != 0 videos diff -r d03fad6123a3 -r f3b2f31332fc libmpcodecs/vf_expand.c --- a/libmpcodecs/vf_expand.c Wed Aug 21 19:08:24 2002 +0000 +++ b/libmpcodecs/vf_expand.c Wed Aug 21 19:12:13 2002 +0000 @@ -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 @@ (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]+