# HG changeset patch # User reimar # Date 1347911429 0 # Node ID 0543235d2e2160123db071cc0372e36246982b72 # Parent aed7a945c1142060168a9063415cc901c2ca7cf7 Fix delogo filter with numbered mpi. Should fix bug #2087. diff -r aed7a945c114 -r 0543235d2e21 libmpcodecs/vf_delogo.c --- a/libmpcodecs/vf_delogo.c Mon Sep 17 19:35:25 2012 +0000 +++ b/libmpcodecs/vf_delogo.c Mon Sep 17 19:50:29 2012 +0000 @@ -180,6 +180,7 @@ if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change if(mpi->imgfmt!=vf->priv->outfmt) return; // colorspace differ // ok, we can do pp in-place (or pp disabled): + mpi->priv = vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, mpi->type, mpi->flags, mpi->w, mpi->h); mpi->planes[0]=vf->dmpi->planes[0]; @@ -197,7 +198,9 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; - if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ + if(mpi->flags&MP_IMGFLAG_DIRECT) { + vf->dmpi = mpi->priv; + } else { // no DR, so get a new image! hope we'll get DR buffer: vf->dmpi=vf_get_image(vf->next,vf->priv->outfmt, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,